Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VLOOKUP with cell reference for sheet

Status
Not open for further replies.

chuck44

MIS
Apr 3, 2002
5
US
As an example, I have a worksheet with columns A thru K with Multiple rows. I would like to have the lookup refer to column K to find the name to put in place of 'sheet2' Is there a function to do this to make it dynamically change itself and pull the data from the correct worksheet.


VLOOKUP(G4,'sheet2'!A$2:B$800,2,FALSE)
 
Something like
=INDIRECT("'"&K2&"'!A$2:B$800")
Though if your sheetname has no spaces then you don't need the single quotes.

Gavin
 
Hi,
Thank-you for your response. I was trying to get it to work with the indirect function, but I was missing something. Turned out to be the last quote. I put it in and all worked well.
Thank-you so very much for your help. Here is my resultant formula, in case someone else needs it.

=VLOOKUP(G2,INDIRECT(""&K2&"!A$2:B$800"),2,FALSE)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top