IF statement limit


Posted by Sherri Spagnola on January 09, 2002 7:49 AM

What if I want to create an if statement with more than 7 nested if statements? I'm using the formula so that when you type a name in one cell, the phone number auto enters into another. I need it to be used on 14 different names but there seems to be a 7 "if statement" limit. Could you please let me know if there is a way to do this? Thank you!!!

Posted by Mark W. on January 09, 2002 7:56 AM

Create a lookup table and use VLOOKUP (nt)



Posted by George J on January 09, 2002 8:10 AM

I would suggest building an array.

Say the names of the people were listed in cell A2 below, with their numbers in the cell next to it etc.

in cell D8 (the cell you want to pick the names from) enter one of the names. in cell E8 enter
=SUM(IF(D8=A2:A10,B2:B10,"no number"))
after entering this into the cell, hol down CTRL SHIFT and press enter. You now have your array.

George