#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
anar_baku
 
Posts: n/a
Default Array Reference


Hi,

Is it possible to make Array References dynamic?

For example I have a formula which is something like this:
=VLOOKUP(A1, [excelFile.xls]*sheetTab*!A1:C10, 2, FALSE)

Is it possible for the value of *sheetTab* in above to depend on the
value of a cell?

So instead of above, I would have something like this:
=VLOOKUP(A1, [excelFile.xls]*A2*!A1:C10, 2, FALSE)

Obviously this formula doesn't work, but hopefully I got my point
accross.


Thanks in advance


--
anar_baku
------------------------------------------------------------------------
anar_baku's Profile: http://www.excelforum.com/member.php...o&userid=18259
View this thread: http://www.excelforum.com/showthread...hreadid=489099

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Eddie O
 
Posts: n/a
Default Array Reference

Check out the INDIRECT formula. Allows you to turn a string of text into a
cell reference (or range). You could construct your string dynamically, then
turn it into a range using the formula.

"anar_baku" wrote:


Hi,

Is it possible to make Array References dynamic?

For example I have a formula which is something like this:
=VLOOKUP(A1, [excelFile.xls]*sheetTab*!A1:C10, 2, FALSE)

Is it possible for the value of *sheetTab* in above to depend on the
value of a cell?

So instead of above, I would have something like this:
=VLOOKUP(A1, [excelFile.xls]*A2*!A1:C10, 2, FALSE)

Obviously this formula doesn't work, but hopefully I got my point
accross.


Thanks in advance


--
anar_baku
------------------------------------------------------------------------
anar_baku's Profile: http://www.excelforum.com/member.php...o&userid=18259
View this thread: http://www.excelforum.com/showthread...hreadid=489099


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
anar_baku
 
Posts: n/a
Default Array Reference


Great stuff, didn't know of this function before! Thanks a lot!

Is there a way of using this as part of a reference though? So could I
have something like:

=VLOOKUP(A1, [excelFile.xls]INDIRECT(A2)!A1:C10, 2, FALSE)


--
anar_baku
------------------------------------------------------------------------
anar_baku's Profile: http://www.excelforum.com/member.php...o&userid=18259
View this thread: http://www.excelforum.com/showthread...hreadid=489099

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid
 
Posts: n/a
Default Array Reference

Yes, you can do it with the following syntax:
=vlookup(a1, indirect("'[excelfile.xls]" & a2 & "'!a1:c10"), 2, false)

As you see, we use the concatenation operator to build the entire
reference for the 2nd argument using INDIRECT().

HTH
Kostis Vezerides

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
Getting all positions of a value in an array or reference Yossi Excel Discussion (Misc queries) 7 January 2nd 09 09:04 PM
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
Array formula reference JAK Excel Discussion (Misc queries) 3 February 22nd 05 03:38 AM
Array formula reference (Corrected) JAK Excel Discussion (Misc queries) 3 February 22nd 05 03:38 AM
How do I return an entire row of data from a reference array? tvmodica Excel Worksheet Functions 2 January 7th 05 08:52 PM


All times are GMT +1. The time now is 01:36 AM.

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"