Nested if statement or Nested if OR statement

  • Thread starter Thread starter CD27
  • Start date Start date
C

CD27

Hello,
Trying to figure out how to do the below...I have 3 columns and in
column D i need to be able to input a text.

So, If cell A2 has a 1 or 2 AND cell B2 has a 1 or 2 AND cell C2 has
a 1 or 2 input "Correct" in cell D2.


A B C D
1 1 2
1 2 2


I can not get this correct. Any help would be appreciated.

Thanks
CD
 
try
=if(and(or(a2=1,a2=2),or(b2=1,b2=2),or(c2=1,c2=2)),"c","nc")
 
=IF(AND(OR(A2={1,2,3}),OR(B2={1,2,3}),OR(C2={1,2,3})),"Correct","")
 
One way:

=IF(AND(OR(A2={1,2}),OR(B2={1,2}),OR(C2={1,2})),"Correct","")
 
A few keystrokes shorter:

=IF(SUM(COUNTIF(A2:C2,{1,2}))=3,"Correct","")
 
Thanks Niek, Don and T. Valko,
It works like a charm now.

Thanks again and take care

Cedric
 

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

Back
Top