Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Search worksheet names?

Is there a way to search through a workbook by first finding a certain
worksheet, then running a vlookup in that worksheet?

EG:
Sheets1~Sheet5
I want to find sheet2, and in sheet2, run vlookup.



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 210
Default Search worksheet names?

You can do this programmatically. Code similar to the following will help
you find the sheet you are looking for:

For each sht in thisworkbook.sheets

if sht.name = strCriteria then

'Can return sheet name to a function here.

end if

next
--
http://HelpExcel.com




"J@Y" wrote:

Is there a way to search through a workbook by first finding a certain
worksheet, then running a vlookup in that worksheet?

EG:
Sheets1~Sheet5
I want to find sheet2, and in sheet2, run vlookup.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Search worksheet names?

What exactly do you mean by "finding" a certain sheet, and by "running" a
VLOOKUP?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"J@Y" wrote in message
...
Is there a way to search through a workbook by first finding a certain
worksheet, then running a vlookup in that worksheet?

EG:
Sheets1~Sheet5
I want to find sheet2, and in sheet2, run vlookup.





  #4   Report Post  
Posted to microsoft.public.excel.misc
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Search worksheet names?

I'm not very familiar with codes. Can you elaborate abit on what exactly is
needed? Will this code be executed as a macro or can I embed it in the cells?

"galimi" wrote:

You can do this programmatically. Code similar to the following will help
you find the sheet you are looking for:

For each sht in thisworkbook.sheets

if sht.name = strCriteria then

'Can return sheet name to a function here.

end if

next
--
http://HelpExcel.com




"J@Y" wrote:

Is there a way to search through a workbook by first finding a certain
worksheet, then running a vlookup in that worksheet?

EG:
Sheets1~Sheet5
I want to find sheet2, and in sheet2, run vlookup.



  #5   Report Post  
Posted to microsoft.public.excel.misc
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Search worksheet names?

Well here is the equation I use right now to vlookup in multiple sheets in a
workbook:

=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)

But that runs into problems when the sheets contain the same words being
looked up. So I'm thinking if there is a way to search for a Sheet name, and
then in that Sheet, perform a vlookup.

"Chip Pearson" wrote:

What exactly do you mean by "finding" a certain sheet, and by "running" a
VLOOKUP?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"J@Y" wrote in message
...
Is there a way to search through a workbook by first finding a certain
worksheet, then running a vlookup in that worksheet?

EG:
Sheets1~Sheet5
I want to find sheet2, and in sheet2, run vlookup.






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
Can vlookup be used to search in more than one worksheet? Rufus T Firefly Excel Worksheet Functions 3 June 17th 06 03:22 AM
How to sort Worksheet names? devrim Excel Discussion (Misc queries) 5 May 26th 06 04:36 PM
Duplicate Range Names by worksheet FlaAl Excel Discussion (Misc queries) 0 May 24th 06 05:14 PM
Lookups using worksheet names Soapydux Excel Discussion (Misc queries) 3 November 6th 05 04:17 PM
Search a worksheet, extract rows using a list from another sheet bobf Excel Discussion (Misc queries) 9 August 31st 05 04:56 AM


All times are GMT +1. The time now is 09:26 PM.

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"