Nesting IF statements in Excel 2010
How do I nest IF statements in Excel 2010? I found my inspiration trying to organize data from Evolus Pencil Support Tickets.
Here is my desired result: I want to nest IF statments to choose between different status levels, such as Fixed, New, Invalid, Done, Duplicate, etc. However, I had to make several tables to achieve this and when I tried to test it, the IF statement only 开发者_JAVA百科gives me the first choice (Fixed).
Here is the formula to test whether the number is 1-6 and add on the number, and the status level:
=IF(U2="1",
CONCATENATE(VALUE(U2),$V$2,IF(U2="2",
CONCATENATE(VALUE(U2),$W$2,IF(U2="3",
CONCATENATE(VALUE(U2),$X$2,IF(U2="4",
CONCATENATE(VALUE(U2),$Y$2,IF(U2="5",
CONCATENATE(VALUE(U2),$Z$2,IF(U2="6",
CONCATENATE(VALUE(U2),$AA$2,"NO")
The result, however, in the corresponding cells is: Cell is U2 1FixedFALSE Cell is U3 false
Please check out the spreadsheet here
http://win7guruquestions.posterous.com/my-spreadsheet-illustrating-selection-and-if
I hope that you can help me with this. Thanks in advance
the formula posted is missing closing brackets. On the assumption it should be
=IF(U2="1",CONCATENATE(VALUE(U2),$V$2),
IF(U2="2",CONCATENATE(VALUE(U2),$W$2),
IF(U2="3",CONCATENATE(VALUE(U2),$X$2),
IF(U2="4",CONCATENATE(VALUE(U2),$Y$2),
IF(U2="5",CONCATENATE(VALUE(U2),$Z$2),
IF(U2="6",CONCATENATE(VALUE(U2),$AA$2),"NO"))))))
it works, provided values in U2 are entered as strings.
An alternative formula:
=IF(AND(VALUE(U2)>=1,VALUE(U2)<=6),U2&INDEX($V$2:$Z$2,1,VALUE(U2)),"NO")
精彩评论