So you want to change the zeros in B to ones?
if b=0 then b=1;
If you do first that then your code will run without any divide by zeros.
if (a<1000)
or (((a/b)<0.1) and (c< 5000000) and d in (., 0))
or (((a/b)<0.1) and (c<10000000) and d in (., 0))
or ((a< 500000) and (c< 5000000) and d in (., 0))
or ((a<1000000) and (c<10000000) and d in (., 0))
then e=1
;
If you only want to do it only when B is > 0 then add that to the code. Note that if you test after you have change the zeros to ones then B will now be > 0.
... View more