Wildwood said:
this formula is returning a Value error.......what is wrong?
=IF(I8="1","0"),
IF(AND(F3="1",I8=4),"48%",
IF(AND(F3="1",I8=3),"53%",
IF(AND(F3="1",I8=2),"60%",
IF(AND(F3="2",I8=4),"65%",
IF(AND(F3="2",I8=3),"70%",
IF(AND(F3="2",I8=2),"70%"))))))
The fundamental flaw is the first right-parenthesis. You should write:
=IF(I8="1","0", [...etc...]
and add a closing right-parenthesis at the end.
But even after correcting that, your formula is undesirable, if not
incorrect, because you put quotes around numbers. Also, if you are using
Excel 2003, you have reached the maximum function nesting level, which would
make it difficult to add conditions later.
Moreover, you do not handle the cases when F3 is neither 1 or 2 and when I8
is not one of 1 through 4. That might be okay, if you are sure those error
conditions never arise.
One of the following might be a better way to go.
1. If you are sure that F3 is 1 or 2 and I8 is one of 1 through 4:
=IF(F3=1, CHOOSE(I8,0,60%,53%,48%),
CHOOSE(I8,0,70%,70%,65%))
2. If you want to handle unexpected F3 and I8:
=IF(AND(F3=1,1<=I8,I8<=4), CHOOSE(I8,0,60%,53%,48%),
IF(AND(F3=2,1<=I8,I8<=4), CHOOSE(I8,0,70%,70%,65%), 0))
That results in zero for unexpected F3 and I8. You might prefer a different
result. If you want the cell to appear blank, replace 0 with the null string
("", two double-quotes).
For Excel 2007 and later, you could write:
=IFERROR(IF(F3=1, CHOOSE(I8,0,60%,53%,48%),
IF(F3=2, CHOOSE(I8,0,70%,70%,65%), 0), 0)
Again, the last two zeros represent results for unexpected conditions.
----- original message -----
Wildwood said:
Please help......this formula is returning a Value error.......what is wrong?
=IF(I8="1","0"),IF(AND(F3="1",I8=4),"48%",IF(AND(F3="1",I8=3),"53%",IF(AND(F3="1",I8=2),"60%",IF(AND(F3="2",I8=4),"65%",IF(AND(F3="2",I8=3),"70%",IF(AND(F3="2",I8=2),"70%"))))))