Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
.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
Posted to microsoft.public.excel.programming
|
|||
|
|||
.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
Posted to microsoft.public.excel.programming
|
|||
|
|||
.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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I find like data in multiple worksheets? | Excel Worksheet Functions | |||
Need to find and return value in cell from multiple worksheets | Excel Discussion (Misc queries) | |||
Find/Replace in multiple worksheets | Excel Discussion (Misc queries) | |||
Find across multiple worksheets | Excel Worksheet Functions | |||
How do I Print the Results of a FIND ALL from multiple worksheets? | Excel Worksheet Functions |