Comparing using "If" function
Hi.
Pick some number of decimal places to round to, and then compare the rounded
values.
=if(round(ab5,5)=round(ab6,5),"yes","no")
Alternatively, you could subtract one from the other and check the abs() of
the result to see that it was less than some small number you picked..
=if(abs(ab5-ab6)<.00001,"yes","no")
"F. Lawrence Kulchar" wrote:
When I input =if(ab5=ab6,"yes","no")
I continually get a "no" because ab5 = 10.00001
and ab6 = 10.00002
Although I have both cells formatted for 0 (zero) decimal places, i.e. they
both show a "10" in the spreadsheet, I wish this comparison to show a "yes"
in its application. Various arithmetic progressions led to the decimal
descrepancy.
How do I correct my "if" comparison to show a "yes" given the above example??
Thanks,
FLKulchar
|