using a variable range name for the vlookup array definition

daviddillon

New Member
Joined
Nov 29, 2005
Messages
3
I'm trying to use a range name as the "array" within a vlookup formula. I can type in a range name and it works, but I want the array to be a variable range name based on the result of another cell.

I've spent too much time on this already...any ideas?
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,216
Office Version
  1. 365
Platform
  1. Windows
David

Without further info all I can suggest is INDIRECT.

=VLOOKUP(A2, INDIRECT(B1), 3, 0)

Where B1 has the named range.
 

daviddillon

New Member
Joined
Nov 29, 2005
Messages
3
Thanks...that works, but I had to use "TRUE" instead of "0" as the range_lookup value.

Thank you so much!

David
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,216
Office Version
  1. 365
Platform
  1. Windows
David

You only use TRUE in a VLOOKUP if you are looking for the closest match.

Is that what you're doing?
 

daviddillon

New Member
Joined
Nov 29, 2005
Messages
3
Yes...I'm looking for the closest match within a rate table that looks like this:

Low High Rate
1 10 $10
11 20 $20
21 30 $30
etc......

So if 11 or 19 is the lookup value, $20 is the returned value from the lookup function.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,437
Messages
5,596,130
Members
414,043
Latest member
thomas Stein

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