A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I reference a cell as PART of a vlookup "Table_Array" locat



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2007, 03:22 PM posted to microsoft.public.excel.worksheet.functions
-Rocket
external usenet poster
 
Posts: 1
Default How do I reference a cell as PART of a vlookup "Table_Array" locat

Basically, I have a matrix, and the top axis is the same as the name of other
pages in my workbook. The left axis are components that are on multiple pages
(the pages named in the top axis). I want to do a vlookup to populate the
matrix, and I need to reference the top axis as part of the vlookup formula:

=VLOOKUP(A4, (CONCATENATE("'", B1, "'!$A$3:$B$78")), 2,FALSE)

Thus, for worksheet named by B1, for array A3:B78, lookup the value in A4,
and return the value in the B column of the above array.

The trouble occurs when I try to reference the other worksheet via the value
in B1. Proper syntax from the "ADDRESS" function is '101'!$A$3:$B$78, which
my CONCATENATE function returns when run separately. Also, I have tried the
"INDIRECT" function surrounding the "CONCATENATE" function with the same
#VALUE error.

Anyone know a work-around or better way to achieve this?
  #2  
Old January 4th, 2007, 03:31 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
external usenet poster
 
Posts: 19,791
Default How do I reference a cell as PART of a vlookup "Table_Array" locat

=vlookup(a4,indirect("'" & b1 & "'!A3:b78"),2,false)

I used the & operator instead of the =concatenate function, but that would work,
too.

-Rocket wrote:

Basically, I have a matrix, and the top axis is the same as the name of other
pages in my workbook. The left axis are components that are on multiple pages
(the pages named in the top axis). I want to do a vlookup to populate the
matrix, and I need to reference the top axis as part of the vlookup formula:

=VLOOKUP(A4, (CONCATENATE("'", B1, "'!$A$3:$B$78")), 2,FALSE)

Thus, for worksheet named by B1, for array A3:B78, lookup the value in A4,
and return the value in the B column of the above array.

The trouble occurs when I try to reference the other worksheet via the value
in B1. Proper syntax from the "ADDRESS" function is '101'!$A$3:$B$78, which
my CONCATENATE function returns when run separately. Also, I have tried the
"INDIRECT" function surrounding the "CONCATENATE" function with the same
#VALUE error.

Anyone know a work-around or better way to achieve this?


--

Dave Peterson
  #3  
Old January 4th, 2007, 03:49 PM posted to microsoft.public.excel.worksheet.functions
-Rocket
external usenet poster
 
Posts: 6
Default How do I reference a cell as PART of a vlookup "Table_Array" l

Works perfectly. Many thanks Dave!

"Dave Peterson" wrote:

=vlookup(a4,indirect("'" & b1 & "'!A3:b78"),2,false)

I used the & operator instead of the =concatenate function, but that would work,
too.

-Rocket wrote:

Basically, I have a matrix, and the top axis is the same as the name of other
pages in my workbook. The left axis are components that are on multiple pages
(the pages named in the top axis). I want to do a vlookup to populate the
matrix, and I need to reference the top axis as part of the vlookup formula:

=VLOOKUP(A4, (CONCATENATE("'", B1, "'!$A$3:$B$78")), 2,FALSE)

Thus, for worksheet named by B1, for array A3:B78, lookup the value in A4,
and return the value in the B column of the above array.

The trouble occurs when I try to reference the other worksheet via the value
in B1. Proper syntax from the "ADDRESS" function is '101'!$A$3:$B$78, which
my CONCATENATE function returns when run separately. Also, I have tried the
"INDIRECT" function surrounding the "CONCATENATE" function with the same
#VALUE error.

Anyone know a work-around or better way to achieve this?


--

Dave Peterson

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:27 AM.


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