Thread: if...
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Jim Aksel Jim Aksel is offline
external usenet poster
 
Posts: 12
Default if...

Format:
iif(test, true, false)
So you need to nest things. You have to asssume something so lets test for
blank first. If it is not blan, then we'll test further.

=iif(IsBlank(D3),"",iif(D3=0,"N","Y"))

That is If D3 is blank, return blank. If D3 contains 0 return N. In all
other cases, return "Y" including ANY value that is not o ... +14, +0.001,
-12, -26.3 ....

To do it the second way you described (returning Y only if D31) you will
need to specify more conditions such as negative numbers and values between 0
and 1.

=iif(IsBlank(D3),"",iif(D3=0,"N",iif(D3=1,"Y","D3 is not zero and is also
less than 1 including negative values")))

"cmccurdy23" wrote:

This should be simple, but I can't quite get it.


If D3 is "" then"" otherwise if D3 is "0" then "N" otherwise "Y"

in other words, if d3 is greater than "1" then "Y" if it is equal to "0"
then "N" if d3 has no data then " "

I've tried nested if's and isblank. My result: if the cell is blank I get
blank, if the cell is 0 I get Y if has any other value I get "Y"

Please help, this should be so easy!