Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel lookups - include a cells value as range name?

Status
Not open for further replies.

FletchUK

Programmer
Nov 6, 2001
16
GB
Hi all,

I'm trying to create a lookup and I want the name of lookup range to be dependant upon the value entered into a cell.

For example, if the user enters the name "Robert" in cell A1 I want the lookup to check the range I've named Robert. If there was only one name the obvious lookup is =vlookup(A6,Robert, 2, false) but with several options I don't know how to make the range a variable. I've tried swapping the word Robert for A1 but this doesn't work. There's probably an easy answer but I don't know it...can anyone help.

Thanks,
FletchUK

 
Hi,
[tt]
=vlookup(A6,indirect(a1), 2, false)
[/tt]


Skip,
[sub]
[glasses] [red]Be advised:[/red] It's been reported that a wee psychic is roaming the countryside.
Small Medium @ Large! [tongue][/sub]
 
Brilliant! Thank you very much Skip.

Fletch

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top