if...

G

Guest

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!
 
G

Guest

cmccurdy23 said:
If D3 is "" then"" otherwise if D3 is "0" then "N" otherwise "Y"

=if(D3="", "", if(D3=0, "N", "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 " "

That is potentially different logic, depending on assumptions about what is
in D3.

=if(D3>1, "Y", if(D3=0, "N", ""))
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"

Perhaps due to your bad habit of putting quotes around numbers, as you did
not in this posting.
 
S

Sandy Mann

Ttry:

=IF(D3="","",IF(D3,"Y","N"))
--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
G

Guest

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 D3>1) 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")))
 
G

Guest

I didn't actually use quotes around numbers in my formala, but thanks. I was
just trying to explain it well, guess I made it a little confusing. The
first formula you provided did not work, but Dave F has solved the problem.
 
G

Guest

Thanks, that worked. I tried to do that, but haven't used ISBLANK a lot so
I'm still getting used to it. It's nice to have people who like you who
provide help but don't criticize. I'm trying to learn a lot more about Excel
because I haven't used it in a couple of years. I try to get things working
myself, Live and Learn, and if I still can't figure it out I turn to the
discussion boards. Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top