ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Allow refence in the "table_array" position of Lookup functions (https://www.excelbanter.com/excel-worksheet-functions/15795-allow-refence-%22table_array%22-position-lookup-functions.html)

fcjssc

Allow refence in the "table_array" position of Lookup functions
 
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?

Max

"fcjssc" wrote

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

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




All times are GMT +1. The time now is 01:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com