if statement - Excel nested IF with "AND" operator behaving weird -
i having weird situation in excel spreadsheet. i'm applying simple nested if statement below:
= if( and(a1-int(a1)>=0.3,a1-int(a1)<=0.7),int(a1)+0.5, if( and(a1-int(a1)>=0,a1-int(a1)<=0.2),int(a1), if( and(a1-int(a1)>=0.8,a1-int(a1)<=0.9),int(a1)+1, "non-checked" ) ) )
suppose if "a1" contains value 32.9, result should 33. works fine until value of "63.9". a1 contains value of "64.9", not check last condition , prints out "non-checked".
it's strange thing works fine until value of 63.9 , after starts become false.
i tried same formula in office suit , google docs too.
am missing here ?
you can test formula here:
thanks.
please try replacing a1-int(a1) round(mod(a1,1),10). seems work numbers less 10^9. if work higher numbers, should decrease precision.
Comments
Post a Comment