VLOOKUP variable array references

G

Guest

Wondering if in a VLOOKUP formula, when I refer to my array, I can refer to a
different worksheet than the one I'm in, with a cell in my current worksheet.
For example, my table array wouldn't be 'Scores'!A1:A5, it would be something
like 'B2'!A1:A5, where cell B2 carries the name of the worksheet I want to
refer to, and obviously varies. Thanks!
 
G

Guest

Use the INDIRECT function.

=VLOOKUP(A1,INDIRECT("'"&B2&"'!A1:B100"),2,FALSE)

Note the use of both double and single quotes. Shown here with additional
spaces for emphasis: " ' " & B2 & " ' !

This allows for the use of spaces in your sheet name(s) stored in B2.

HTH,
Elkar
 

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