Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Folder search
At present to search for a date within my workbook I use the following code,
Sub myfind() Dim Message, Title, Default, SearchString Message = "Enter date as ( d-* or dd-* )" ' Set prompt. Title = "Select Day " ' Set title. Default = "dd-mmm-yy" ' Set default. ' Display message, title, and default value. SearchString = InputBox(Message, Title, Default) 'SearchString = "Rob" Set S = Sheets.Application For Each S In Application.Sheets With S.Range("A1:IV65536") Set F = .find(SearchString, MatchCase:=False, LookAt:=xlPart, LookIn:=xlValues) If F Is Nothing Then Else Location = F.Address S.Select Range(Location).Select Exit For End If End With Next S End Sub What I want to do is to be able to apply this to searching a folder and it's subfolders for a date within the books in the folders. The date I will be searching for will only ever exist once in the folders. Is there a way I can search the folders for a date that exists in a cell on each spreadsheet |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
search a folder? | New Users to Excel | |||
Microsoft Search opens when I click on a file folder | Setting up and Configuration of Excel | |||
search folder/directory for a phrase inside excel files | Excel Discussion (Misc queries) | |||
Can Excel search for workbook data in a Windows folder? | Excel Discussion (Misc queries) | |||
Import Folder Search Results in a spreadsheet? | Excel Discussion (Misc queries) |