Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default .Find Across Multiple worksheets


In a previous post I had a question regarding .find as I wanted to write
a macro that would loop through some code and find a value given a value
stored in a variable.

This is all fine however i have found that .Find does not like to look
beyond the the current worksheet that has focus. In other words it does
not parse the other sheets and stops after it has parsed the currently
selected sheet.

There something I am missing or do I need some smart code.

I have the below (minus error0 handling) the find code I am using


Cells.Find(What:=Grand, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

Cheers

Mozart


--
mozart
------------------------------------------------------------------------
mozart's Profile: http://www.excelforum.com/member.php...o&userid=13314
View this thread: http://www.excelforum.com/showthread...hreadid=398137

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default .Find Across Multiple worksheets

I found this code on the URL below. I don't know if it works, but give it a
shot.

http://www.mrexcel.com/archive/Edit/3621.html

Dim ws As Worksheet
For Each ws In Worksheets
ws.Activate
'PUT YOUR CODE HERE
Next ws

HTH,
Paul


"mozart" wrote in
message ...

In a previous post I had a question regarding .find as I wanted to write
a macro that would loop through some code and find a value given a value
stored in a variable.

This is all fine however i have found that .Find does not like to look
beyond the the current worksheet that has focus. In other words it does
not parse the other sheets and stops after it has parsed the currently
selected sheet.

There something I am missing or do I need some smart code.

I have the below (minus error0 handling) the find code I am using


Cells.Find(What:=Grand, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

Cheers

Mozart


--
mozart
------------------------------------------------------------------------
mozart's Profile:
http://www.excelforum.com/member.php...o&userid=13314
View this thread: http://www.excelforum.com/showthread...hreadid=398137



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default .Find Across Multiple worksheets

Try grouping your sheets before you run your FIND code:

Sheets.Select


--
Regards,
Tom Ogilvy


"mozart" wrote in
message ...

In a previous post I had a question regarding .find as I wanted to write
a macro that would loop through some code and find a value given a value
stored in a variable.

This is all fine however i have found that .Find does not like to look
beyond the the current worksheet that has focus. In other words it does
not parse the other sheets and stops after it has parsed the currently
selected sheet.

There something I am missing or do I need some smart code.

I have the below (minus error0 handling) the find code I am using


Cells.Find(What:=Grand, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

Cheers

Mozart


--
mozart
------------------------------------------------------------------------
mozart's Profile:

http://www.excelforum.com/member.php...o&userid=13314
View this thread: http://www.excelforum.com/showthread...hreadid=398137



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
How do I find like data in multiple worksheets? 3boys1wife Excel Worksheet Functions 1 November 4th 09 09:21 PM
Need to find and return value in cell from multiple worksheets Jane Doe[_3_] Excel Discussion (Misc queries) 0 September 10th 08 11:40 PM
Find/Replace in multiple worksheets Lynn Excel Discussion (Misc queries) 1 March 22nd 07 04:17 PM
Find across multiple worksheets edwardpestian Excel Worksheet Functions 2 August 5th 06 01:36 PM
How do I Print the Results of a FIND ALL from multiple worksheets? KVee Excel Worksheet Functions 1 May 25th 05 12:38 PM


All times are GMT +1. The time now is 09:55 AM.

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"