ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Reference previous worksheet within VLOOKUP (https://www.excelbanter.com/excel-worksheet-functions/228043-reference-previous-worksheet-within-vlookup.html)

Alex Mackenzie

Reference previous worksheet within VLOOKUP
 
I have found several previous postings about this, but still cannot get my
function to work. If I put the name of the previous worksheet (e.g. March
09! {formatted as text}) in a cell (T2), then in my VLOOKUP I use VLOOKUP(A2,
INDIRECT($T$2&A2:B100,1),FALSE) I get either #REF or #VALUE error, depending
on how I tinker with the formula. Not sure what is missing. Using EXCEL
2000.

Any assistance would be appreciated. Thank you.

Lars-Åke Aspelin[_2_]

Reference previous worksheet within VLOOKUP
 
On Fri, 17 Apr 2009 10:54:11 -0700, Alex Mackenzie
wrote:

I have found several previous postings about this, but still cannot get my
function to work. If I put the name of the previous worksheet (e.g. March
09! {formatted as text}) in a cell (T2), then in my VLOOKUP I use VLOOKUP(A2,
INDIRECT($T$2&A2:B100,1),FALSE) I get either #REF or #VALUE error, depending
on how I tinker with the formula. Not sure what is missing. Using EXCEL
2000.

Any assistance would be appreciated. Thank you.



Try this formula:

=VLOOKUP(A2,INDIRECT($T$2&"A2:B100"),1,FALSE)

or

=VLOOKUP(A2,INDIRECT($T$2&"A2:B100"),2,FALSE)

if you want values from the B column to be returned.

Note the " around A2:B100 and that the 1 (or the 2) is outside the
call to INDIRECT rather than inside as in your formula.

Hope this helps / Lars-Åke

Teethless mama

Reference previous worksheet within VLOOKUP
 
=VLOOKUP(A2,INDIRECT("'"&T2&"'!A2:B100"),2,0)


"Alex Mackenzie" wrote:

I have found several previous postings about this, but still cannot get my
function to work. If I put the name of the previous worksheet (e.g. March
09! {formatted as text}) in a cell (T2), then in my VLOOKUP I use VLOOKUP(A2,
INDIRECT($T$2&A2:B100,1),FALSE) I get either #REF or #VALUE error, depending
on how I tinker with the formula. Not sure what is missing. Using EXCEL
2000.

Any assistance would be appreciated. Thank you.



All times are GMT +1. The time now is 10:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com