Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
LRM LRM is offline
external usenet poster
 
Posts: 2
Default lookup and worksheet name and then do formula

I have multiple worksheets named after customers...say "BW", "CAR", etc.
In the first summary worksheet I want to input formulas to grab info from
the correct worksheet. In other words, I want the formula in A2 to search
for a name in cell A1 that corresponds with the worksheet and then pull info
from a specific cell in that worksheet.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default lookup and worksheet name and then do formula

A1 contain worksheet name
C2 is a info in that worksheet you want to pull

=INDIRECT(A1&"!C2")


"LRM" wrote:

I have multiple worksheets named after customers...say "BW", "CAR", etc.
In the first summary worksheet I want to input formulas to grab info from
the correct worksheet. In other words, I want the formula in A2 to search
for a name in cell A1 that corresponds with the worksheet and then pull info
from a specific cell in that worksheet.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default lookup and worksheet name and then do formula

Hi LRM,

I got this from Peo Sjoblom in 2006. It looks across eight worksheets, more
if needed. Even with a two page e-mail from Peo explaining it, I cannot
completely get my head around it. I grasp the concept and can apply it but
I do not fully understand it. Both formulas do the same thing, the first
combines all the sheet name into a named range and vastly shortens the
formula. The first is array entered (CTRL+SHIFT+ENTER) the second is by
ENTER.

=VLOOKUP(A2,INDIRECT("'"&INDEX(MySheets,MATCH(1,--(COUNTIF(INDIRECT("'"&MySheets&"'!A2:A200"),A2)0) ,0))&"'!A2:C200"),3,0)

=VLOOKUP(A2,INDIRECT("'"&INDEX({"Sheet1";"Sheet2"; "Sheet3";"Sheet4";"Sheet5";"Sheet6";"Sheet7";"Shee t8"},MATCH(1,--(COUNTIF(INDIRECT("'"&{"Sheet1";"Sheet2";"Sheet3"; "Sheet4";"Sheet5";"Sheet6";"Sheet7";"Sheet8"}&"'!A 2:A200"),A2)0),0))&"'!A2:C200"),2,0)

I would be glad to take a look at a sample workbook and see if I could make
it work for you if you cannot adapt it to your workbook.

HTH
Regards,
Howard


"LRM" wrote in message
...
I have multiple worksheets named after customers...say "BW", "CAR", etc.
In the first summary worksheet I want to input formulas to grab info from
the correct worksheet. In other words, I want the formula in A2 to search
for a name in cell A1 that corresponds with the worksheet and then pull
info
from a specific cell in that worksheet.



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
Excel worksheet lookup sleddude Excel Discussion (Misc queries) 1 October 8th 08 07:48 PM
Formula to lookup worksheet label Grotejm Excel Worksheet Functions 3 April 3rd 08 05:16 AM
lookup for worksheet Bradrok Excel Worksheet Functions 1 April 2nd 08 11:04 PM
Worksheet lookup Greg B Excel Discussion (Misc queries) 2 August 4th 05 12:47 PM
formula to lookup table in another Worksheet please Steved Excel Worksheet Functions 1 June 14th 05 10:39 AM


All times are GMT +1. The time now is 01:12 PM.

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

About Us

"It's about Microsoft Excel"