Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Syntax error in nested IF statement.

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

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

Why is that? Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Syntax error in nested IF statement.

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
---------------
Jacob Skaria


"Sander" wrote:

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

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

Why is that? Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Syntax error in nested IF statement.

It is really zero, formatted General, ... output of a prior IF statement.
Thanks for your interest and help.

"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"Sander" wrote:

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

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

Why is that? Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Syntax error in nested IF statement.

(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.

"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"Sander" wrote:

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

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

Why is that? Thank you.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 225
Default Syntax error in nested IF statement.

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

On 15 July, 19:04, Sander wrote:
(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.

"Jacob Skaria" wrote:
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
---------------
Jacob Skaria


"Sander" wrote:


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


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


Why is that? *Thank you.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Syntax error in nested IF statement.

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.

"Andrew Taylor" wrote:

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

On 15 July, 19:04, Sander wrote:
(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.

"Jacob Skaria" wrote:
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
---------------
Jacob Skaria


"Sander" wrote:


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


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


Why is that? Thank you.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF statement syntax Sander Excel Discussion (Misc queries) 4 July 14th 09 06:04 PM
if statement syntax help OfficeManager Excel Worksheet Functions 6 July 23rd 08 08:09 PM
nested if contains a syntax error because of a "." Janis Excel Discussion (Misc queries) 3 September 5th 07 04:51 PM
nested if statement returns #value error [email protected] Excel Discussion (Misc queries) 3 August 10th 06 04:27 PM
COMPARING DATES with nested IF not working- Syntax is correct though Richard Flame Excel Discussion (Misc queries) 2 July 12th 06 07:04 PM


All times are GMT +1. The time now is 05:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"