View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Help with Nested IF Statements

I assume you need to expand this portion:

IF(A13="A",2,IF(A13="B",3......


One way to do it would be to use another "lookup".

X1:X10 = letters A, B, C, D etc.

Then, you'd replace the nested if with something like this:

MATCH(A13,X1:X10,0)+1

--
Biff
Microsoft Excel MVP


"Ken" wrote in message
...
Hello,

I have a nested IF statement that needs to be much larger than it is.
Currently, there are six IF statements all nested into another IF. I need
to
add eight more IF's into the formula, but Excel won't allow it. Below is
the
formula. The formula does a HLookup at rangename AccountNumbers.

This is the formula as it is currently written:
=IF(H13="","",IF(A13="","",HLOOKUP(H13,AccountNumb ers,IF(A13="A",2,IF(A13="B",3,IF(A13="C",4,IF(A13= "D",5,IF(A13="E",6,""))))),FALSE)))

Any help anyone can offer would be great! Maybe there is another way of
doing this.
--
Ken