View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Logical test in IF statement returning incorrect result

Here is an explanation of the problem:

http://www.cpearson.com/Excel/rounding.htm

The fix is to round your test, e3-e15=0, depending on how many digits of
precision you need.

=IF(ROUND(E3-E15,5)=0,"",E3-E15)



--
Biff
Microsoft Excel MVP


"Isabel" wrote in message
...
I am trying to create a simple IF statement in Excel 2007. The logical
test
in this case is true but the function returns a false. Looking in the
solution, the calculation is incorrect. The specifics a

if(e3-e15=0,"",e3-e15) In my case the result is 0, so I should be seeing
a
blank cell. What I get is (0.00000000023283064) so the cell shows a (0)
rather than being blank. If I enter the formula e3-e15, not in part of
the
function, the answer is 0.0000000000000000, which is the correct
solution.
The only reason I'm showing all the decimal places is because the
incorrect
solution has the result so far to the right of the decimal and that is the
only way I discovered why the statement was not resulting in a blank cell.

Can anyone tell me why I might be seeing the incorrect result? By the
way,
other IF statements that do not have a calculation in the logical test are
returning the correct results.

thank you