Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entire Workbook Search
Is there any way to perform a "global" search or "lookup" of a given piece
of data in an entire workbook composed of several worksheets?? Any advise will be greatly appreciated. Art |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entire Workbook Search
Sub FindInWorkbook()
Dim rng as Range, sh as Worksheet Dim vTarget as Variant, fAddr as String vTarget = "dog" For each sh in ActiveWorkbook.Worksheets With sh.Cells Set rng = .Find(vTarget, _ LookIn:=xlValues, _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng Is Nothing Then fAddr = rng.Address Do msgbox rng.Address(0,0,xlA1,external:=True) Set rng = .FindNext(rng) Loop While rng.Address < fAddr End If End With Next sh End Sub -- Regards, Tom Ogilvy "ArtLab" wrote in message ... Is there any way to perform a "global" search or "lookup" of a given piece of data in an entire workbook composed of several worksheets?? Any advise will be greatly appreciated. Art |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
save search settings having all tabs selected-or entire workbook | Excel Worksheet Functions | |||
VLookup function to search an entire workbook | Excel Worksheet Functions | |||
Search Entire Workbook | Excel Discussion (Misc queries) | |||
Search Entire Workbook | Excel Discussion (Misc queries) | |||
How to Search for word in the Entire Workbook | Excel Discussion (Misc queries) |