Text Functions and setting up a dynamic VLookup

Yellowfin

New Member
Joined
Jul 8, 2002
Messages
7
Good morning,

I'm struggling with a vlookup() that I want to make a bit more dynamic.

I have a series of named ranges that I'd like to feed into the Table Array field (the 2nd vlookup parameter). The names of the range are all of the form Rates_X where "X" can be 1,2,3, or 4. The X value appropriate for the row where I'm placing the lookup can be determined easily. So I tried to create a new cell that was ="Rate_"&X and then using a T() function with that cell reference as the Table Array. No luck. I get a #Value error which indicates it is not intrpretting the text as a name.

Any idea how I can get the function to recognize the input as a name?

Thanks in advance.


Jim
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,203
=VLOOKUP(lookup-value,INDIRECT("Rate_"&X),col-index,match-type)

where X is a value that completes the name of the range of interest.
This message was edited by aladin akyurek on 2002-09-08 03:31
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Here is an example using Aladin's Formula
Book1
ABCDEFGHI
1TypeTbl NumTable Rate_1Table Rate_2
2Circle2TypeStyleTypeStyle
3RedCircleRedCircleGreen
4GreenSquareBlueSquareYellow
...
 

Yellowfin

New Member
Joined
Jul 8, 2002
Messages
7
Thank You!

I knew there was another function involved, I just couldn't figure out that it was Indirect().

As always, thanks.



Jim
 

Watch MrExcel Video

Forum statistics

Threads
1,130,444
Messages
5,642,180
Members
417,259
Latest member
gtacw

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top