VLOOKUP with variable "Table_Array"

T

thomaswaynemorris

Rather than specifying a specific named array such as in Vlookup(A1,
namedarray,2,false)
I'd like the table_array value for the vlookup function to depend on which
table name appears in a specific cell.

For example, if cell A2 contains the text array1, then
VLOOKUP(A1,A2,2,FALSE) would return the value associated with array1
if cell A2 contains the text array2, the Vlookup(A1,A2,2,false)
would return the value associated with array2.

Thanks for the help.
 
D

Dave Peterson

How about:

=vlookup(a1,indirect(a2),2,false)

Rather than specifying a specific named array such as in Vlookup(A1,
namedarray,2,false)
I'd like the table_array value for the vlookup function to depend on which
table name appears in a specific cell.

For example, if cell A2 contains the text array1, then
VLOOKUP(A1,A2,2,FALSE) would return the value associated with array1
if cell A2 contains the text array2, the Vlookup(A1,A2,2,false)
would return the value associated with array2.

Thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top