Nested IF statement

R

Ricki Miles

I am working in Excel 2003. Cell A1 can contain several different words
(WHOLE, SKIM, ETC). B1, C1, D1 and E1 can contain either the words "YES" or
"NO". If A1 contains the word "WHOLE" and B1, C1, D1 and E1 all contain
the word "YES", I need to put the word "CORRECT" in F1. I am having
difficulty nesting the IF statements and would appreciate any help. Thanks,

Ricki
 
J

joeu2004

I am working in Excel 2003.  Cell A1 can contain several
different words (WHOLE, SKIM, ETC).  B1, C1, D1 and
E1 can contain either the words "YES" or "NO".    If A1
contains the word "WHOLE" and B1, C1, D1 and E1 all
contain the word "YES", I need to put the word "CORRECT"
in F1.  I am having difficulty nesting the IF statements and
would appreciate any help.

Well, the following would suffice for the example above. In F1:

=if(and(A1="whole",B1="yes",C1="yes",D1="yes",E1="yes"), "correct",
"")

However, if your more-general problem is more complex that you
described, you might need a different kind of solution.
 
P

Pete_UK

Try it this way:

=IF(AND(A1="WHOLE",COUNTIF(B1:E1,"YES")=4),"CORRECT","wrong")

Hope this helps.

Pete
 
R

Ricki Miles

Thank you all so much - it is working now. I appreciate the help!

Ricki

Try it this way:

=IF(AND(A1="WHOLE",COUNTIF(B1:E1,"YES")=4),"CORRECT","wrong")

Hope this helps.

Pete
 

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