VLOOKUP with variable "Table_Array"

  • Thread starter Thread starter thomaswaynemorris
  • Start date Start date
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.
 
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.
 
Back
Top