Allow refence in the "table_array" position of Lookup functions

F

fcjssc

Should add the ability to use Functions or References to determine the
"table_array" name in Lookup functions. Is there a work around better than
nested IF statements?
 
M

Max

fcjssc said:
Should add the ability to use Functions or References
to determine the "table_array" name in Lookup functions.

Think using INDIRECT() would be one way

Example:

Assume TBL1 and TBL2 are the defined names
of 2 table_arrays.

And you have in

A5: TBL
B5: 1
C5: 2

Then something like this:

In B6: =VLOOKUP(A6,INDIRECT($A$5&B$5),2,0)
with B6 copied across to C6

will give the same returns as having

in B6: =VLOOKUP($A6,TBL1,2,0)
in C6: =VLOOKUP($A6,TBL2,2,0)
Is there a work around better than
nested IF statements?

Using VLOOKUP might be one consideration to look at
 

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