are variable table-array names in functions possible?

G

Guest

Is it possible somehow to use variable table array names in VLookup or
HLookup? I would like to create a drop down list of tables, then use the
look-up function against the table designated for example =HLOOKUP(D6,,2)
where Scenario is a cell reference to the selection from the drop down list.
All I am able to get is an #N/A error. The HLOOKUP function works as
expected if I replace the cell reference (ie. Scenario) with an actual table
name (eg. Scenario1).

JimH
 
G

Guest

Sorry the formula that doesn't work should say =HLOOKUP(D6,Scenario,2) where
Scenario is a cell reference to the selection from the drop down list
 
G

Guest

Try

=HLOOKUP(D6,INDIRECT(Scenario),2)


JimH said:
Sorry the formula that doesn't work should say =HLOOKUP(D6,Scenario,2) where
Scenario is a cell reference to the selection from the drop down list
 

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