#1
|
|||
|
|||
Vlookup and If statement problem
Hi,
I am having trouble with the syntax for this. =VLOOKUP(B20, SpanCatForce, IF(AND(C20="4%"), 2, IF(AND(C20="5%"), 3, IF(AND(C20="6%"), 4, IF(AND(C20="7%"), 5, IF(AND(C20="8%"), 6, IF(AND(C20="9%"), 7, IF(AND(C20="10%"), 8, IF(AND(C20="11%"), 9, IF(AND(C20="12%"), 10, IF(AND(C20="13%"), 11, IF(AND(C20="14%"), 12,"check")))))))))))) I am trying to look up data in multiple columns where B20 contains the line value and C 20 determines which column to use Any assistence would be appreciated Peter |
#2
|
|||
|
|||
Peter,
The AND statements in each of your nested IF's are not required as you only have one statement to check in C20. Remove these and try again e.g. [ IF(C20="4%", 2, ], let me know if this solves your problem. Regards, David |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
vlookup question | Tony G | Excel | 9 | 03-28-2009 11:16 PM |