Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable Names in Source Data References in Charts Teflon TA Charts and Charting in Excel 2 January 21st 07 05:46 AM
variable cell references ???? kiethb Excel Discussion (Misc queries) 2 February 10th 06 08:22 PM
Creating cell references with variable values to use in Vlookup jackebro Excel Discussion (Misc queries) 2 December 14th 05 02:46 PM
Variable Column references Gidders Excel Worksheet Functions 1 July 15th 05 07:54 PM
variable worksheet references mattbloodgood Excel Discussion (Misc queries) 3 July 7th 05 08:34 PM


All times are GMT +1. The time now is 04:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"