Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VLOOKUP variable array references
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! -- Simon |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VLOOKUP variable array references
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 "Simon" wrote: 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! -- Simon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Variable Names in Source Data References in Charts | Charts and Charting in Excel | |||
variable cell references ???? | Excel Discussion (Misc queries) | |||
Creating cell references with variable values to use in Vlookup | Excel Discussion (Misc queries) | |||
Variable Column references | Excel Worksheet Functions | |||
variable worksheet references | Excel Discussion (Misc queries) |