variable reference in hlookup array

G

Guest

Hi, I have many Hlookup functions in which the array is in
one of many sheets, all named with a number (say 1000).
Since there are many of these numbered sheets the
reference in the hlookup function needs to be a variable.
In column A I have the specific sheet name I need to
reference and I am hoping I can point at that cell as part
of the array address within the hlookup function. I was
trying the following but it doesn't work.

HLOOKUP(6,'A4'!$D$2:$Z$50,9)

where A4 = 9000

Please help
 
S

Soe

it works in same workbook, however, when we put in path for a different
workbook, it doesn't work.
any idea why is that?
 
H

Harlan Grove

Soe said:
why =HLOOKUP(6,INDIRECT(A4 & "D2:Z50"),9), A4='9000'! doesn't work?
....

Does A4 appear as '9000'! or as 9000'! ? If the former, the first single
quote is treated as a text prefix character and isn't treated as part of the
cell's value. To get an initial single quote, you need to type two single
quotes at the beginning of a text constant.
 

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