Syntax error in nested IF statement.

  • Thread starter Thread starter Sander
  • Start date Start date
S

Sander

For I22: =IF(J22<0,1000,IF(J22>0,0,I23)).

This works when J22 > or < 0, but not when J22=0, when it should take I23.

Why is that? Thank you.
 
Check whether it is really zero; or displayed as zero

=IF(J22<0,1000,IF(INT(J22)=0,I23,0))

If this post helps click Yes
 
It is really zero, formatted General, ... output of a prior IF statement.
Thanks for your interest and help.
 
(Answered once, an hour ago; don't know why it has not appeared. once
again...)

It is really zero, remains zero as decimal places are expanded, defined as
"0" by another IF statement, and formatted as General. Thanks again for your
continued help.
 
It seems most likely that the value is some very small
non-zero number (though your assurance that it's
formatted as General makes that harder to believe).

To avoid the complications of the nested IFs, try entering
=F22=0 in a spare cell, and see if you get TRUE. If not,
try multiplying the value by large numbers to see what
you get - e.g, =F22*1000000

(I assume the value in I23 isn't zero, BTW...)

Andrew
 
Entering "=F22=0" returns "TRUE", except when F22 actually has something else
in it, in which case it returns "FALSE".

Any help you can provide resolving this mystery would be greatly appreciated.
 
Back
Top