Nested IF Statements

T

Tony Bogle

How many nested IF statements can I have? I have 20
possible numeric values which can be in cell B1. These
numeric values represent a part description. I want to
be able to automatically populate cell B2 with the
description of the numeric value in cell B1. This works
when I limit the number of IF statements to 7, however, I
need 20. Is there any other way to do this?
 
B

Bernard V Liengme

Hi Tony,
Yes 7 is the limit for nesting functions.
Generally one uses a lookup (VLOOKUP or HLOOKUP) in cases like yours. Read
Help and return with questions if needed.
Chip has some suggestions at www.cpearson.com

Best wishes
Bernard
 
J

J.E. McGimpsey

7 is the limit. But your description sounds perfect for a lookup
table.

Put the 20 numbers in a column (perhaps on a different sheet, say,
Sheet2!A1:A20) and the part description in an adjacent column
(Sheet2!B1:B20).

Then in sheet1, put

B2: =VLOOKUP(B1, Sheet2!A:B, 2, FALSE)

and for whatever part number is in B1, the corresponding description
will be returned to B2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top