# Microsoft Office Application Help - Excel Help forum > Excel General >  >  Excel 2010 Nested IF / AND Statement

## snikrs11

I think I'm looking for a nested If And statement.  In column U W and X I have a drop down of Yes, No and N/A.  What I am looking to do is score based on the Yes, No and N//A answers.

U3 = no then n/a
U3 = yes, W3 = no, X3 = yes = 1
U3 = yes, W3 = no, X3 = no = 2
U3 = yes, W3 = yes, X3 = yes = 0

This is the formula I created.  It sort of worked it accepted my formula but with a #VALUE! response saying I was missing some parenthases.

=IF(AND(U3="Yes",W3="Yes",X3="Yes"),"0"),
IF(AND("Yes",W3="No",X3="Yes"),"1"),
IF(AND("Yes",W3="Yes",X3="No"),"1"),
IF(AND("Yes",W3="No",X3="No"),"2","N/A")

If you can add any assistance, I'd appreciate it.

----------


## NBVC

Try:

=IF(U3="no","n/a",IF(W3="no",IF(X3="yes",1,2),IF(X3="Yes",0,"")))

----------


## ConneXionLost

Posted in error.

----------


## snikrs11

Thank you.  I've entered another argument to this that I forgot to tell you (Yes, Yes, No), which works.  However, now that I've done that my Yes, Yes, Yes won't = 0.  Can you tell me what I did wrong?

=IF(U5="no","n/a",IF(W5="no",IF(X5="yes",1,2),IF(W5="yes",IF(X5="no",1,2),IF(X5="Yes",0,""))))

----------


## NBVC

This part:

IF(X5="no",1,2),IF(X5="Yes",0,"")

doesn't make sense.

the first part says if X5 ="no", then 1, else 2.. which means if X5 is not "no" it will be 2 and the second part will never get evaluated...

Can X5 be anything other than "yes" or "no"?

Should it be:  IF(X5="no",1,0)

----------


## snikrs11

Yes IF(x5="no",1,0) worked.  Thank you so very much!

----------

