# EXCELL, "IF" FORMULA

#### dave8664

##### New Member
I AM TRYING TO USE THE IF FORMULA TO CHANGE THE TEXT IN CELL D1,TO A DESCRIPTION BASED ON A VAULE IN CELL C1.EXAMPLE: =IF(C1=1,F1,IF(C1=2,F2))
CELLS IN THE F COLUMN HAVE THE DESCRIPTION
TO MATCH THE VALUES OF 1 OR 2 OR SO ON.
I NEED TO HAVE MANY IF VALUES, 100 OR SO. THE IF FUNCTION ONLY ALLOWS FOR 7 VAULES DO I USE VLOOKUP? OR SOMETHING ELSE.

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You are right each cells "If statement" can only have seven nested IF's but the last "IF" can direct the next condition to an additional cell(s). Each additional cell containing seven more "If's."

Also your sample is incorrect your last "If" needs a "then" condition result, IF(test,then,else) syntax!

If(test,then,If(test,then,else))

Yes, I would use a "VLookUp" in your case. JSW

On 2002-09-04 10:07, dave8664 wrote:
I AM TRYING TO USE THE IF FORMULA TO CHANGE THE TEXT IN CELL D1,TO A DESCRIPTION BASED ON A VAULE IN CELL C1.EXAMPLE: =IF(C1=1,F1,IF(C1=2,F2))
CELLS IN THE F COLUMN HAVE THE DESCRIPTION
TO MATCH THE VALUES OF 1 OR 2 OR SO ON.
I NEED TO HAVE MANY IF VALUES, 100 OR SO. THE IF FUNCTION ONLY ALLOWS FOR 7 VAULES DO I USE VLOOKUP? OR SOMETHING ELSE.

Dave,

If you have unique look up vales (1, 2)that translates into description, then use VLOOKUP. However if you have only values 1 and 2 describing more than 2 things, the another route you must take!
Book1
ABCD
11red3blue
22green
33blue
44yellow
Sheet1

You could also use OFFSET:

Assuming your data starts in C1, and your descriptions start in F1.

=OFFSET(\$C\$1,C1-1,3)
Book1
BCDEFG
11test1test1
22test2test2
33test3test3
440
5
Sheet1

Also,
=INDIRECT("f"&C1)
may work for you. Generally, try to avoid the use of volotile functions such as this, but sometimes they fit the bill.

Good luck.

On 2002-09-04 10:07, dave8664 wrote:
I AM TRYING TO USE THE IF FORMULA TO CHANGE THE TEXT IN CELL D1,TO A DESCRIPTION BASED ON A VAULE IN CELL C1.EXAMPLE: =IF(C1=1,F1,IF(C1=2,F2))
CELLS IN THE F COLUMN HAVE THE DESCRIPTION
TO MATCH THE VALUES OF 1 OR 2 OR SO ON.
I NEED TO HAVE MANY IF VALUES, 100 OR SO. THE IF FUNCTION ONLY ALLOWS FOR 7 VAULES DO I USE VLOOKUP? OR SOMETHING ELSE.

If the domain of C1 are integers that obey the rule 1, 2, 3,..., then you could also use in D...

=INDEX(F-range,C1)

Replies
4
Views
159
Replies
5
Views
304
Replies
1
Views
318
Replies
1
Views
137
Replies
8
Views
181

1,220,979
Messages
6,157,182
Members
451,402
Latest member
Lyv

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back