ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Nested IF statement (https://www.excelbanter.com/excel-worksheet-functions/213786-nested-if-statement.html)

Ricki Miles

Nested IF statement
 
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



Max

Nested IF statement
 
This might suffice for your intents to check responses in B1:E1
In F1: =IF(COUNTIF(B1:E1,"Yes")=4,"Correct","")
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"Ricki Miles" wrote in message
...
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




joeu2004

Nested IF statement
 
On Dec 15, 4:33*pm, "Ricki Miles" wrote:
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.


Pete_UK

Nested IF statement
 
Try it this way:

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

Hope this helps.

Pete

On Dec 16, 12:33*am, "Ricki Miles" wrote:
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



Ricki Miles

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

Ricki

"Pete_UK" wrote in message
...
Try it this way:

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

Hope this helps.

Pete

On Dec 16, 12:33 am, "Ricki Miles" wrote:
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




Pete_UK

Nested IF statement
 
You're welcome, Ricki - glad to be of help.

Pete

On Dec 16, 3:44*am, "Ricki Miles" wrote:
Thank you all so much - it is working now. *I appreciate the help!

Ricki

"Pete_UK" wrote in message

...
Try it this way:

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

Hope this helps.

Pete

On Dec 16, 12:33 am, "Ricki Miles" wrote:



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- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com