vlookup question

darkmidget

New Member
Joined
Jun 12, 2002
Messages
18
Hi,



I am wondering if you can have the table array portion of the vlookup formula link to another cell. For example: I want the formula to be =vlookup(A1,C1,2) C1 would be one of 3 different defined names to different ranges. Is this possible and if so can you point me in the right direction?


Thanks,

Matt
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Try

=VLOOKUP(A1,INDIRECT(C1),2)

where C1 contains your range name.

Richard

EDIT: Too slow by far :(

_________________
constrMining.gif

This message was edited by RichardS on 2002-10-21 20:55
 
Upvote 0
On 2002-10-21 20:46, darkmidget wrote:
Hi,



I am wondering if you can have the table array portion of the vlookup formula link to another cell. For example: I want the formula to be =vlookup(A1,C1,2) C1 would be one of 3 different defined names to different ranges. Is this possible and if so can you point me in the right direction?


Thanks,

Matt

Matt,

With 3 different names, you could get away with IF...

=VLOOKUP(A1,IF(C1="Name1",Name1,IF(C1="Name2",Name2,Name3)),2)
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,090
Members
448,944
Latest member
sharmarick

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
Back
Top