View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Too many arguments for nested IFs

Maybe something like this:

Create a 2 column table like this:

10MP...MP
20BV...BV
30HH...HH
40AP...AP
50CM...CM
60RS...RS

Assume this table is in the range F1:G6

Then use this formula:

=IF(OR(A2="",COUNT(MATCH(LEFT(A2,2)&C2,F1:F6,0))), "","Change Sector To
"&INDEX(G1:G6,MATCH(LEFT(A2,2)&"*",F1:F6,0)))


--
Biff
Microsoft Excel MVP


"Marie FP" <Marie wrote in message
...
I've created a nested IF statement that works fine using 6 IFs but does
not
work when I add a 7th, the maximum number allowed. However, I ultimately
need 10. Does someone know of an alternative way of doing this? The
formula
looks like this:

=IF(AND(LEFT(A2,2)="10",NOT(C2="MP")),"Change Sector to
MP",IF(AND(LEFT(A2,2)="20",NOT(C2="BV")),"Change Sector to
BV",IF(AND(LEFT(A2,2)="30",NOT(C2="HH")),"Change Sector to
HH",IF(AND(LEFT(A2,2)="40",NOT(C2="AP")),"Change Sector to
AP",IF(AND(LEFT(A2,2)="50",NOT(C2="CM")),"Change Sector to
CM",IF(AND(LEFT(A2,2)="60",NOT(C2="RS")),"Change Sector to RS",""))))))