This code builds a Search Collection of the subject Folder, so if that Folder has a large number of files, this could take a long time! Once the collection is established the search code is somewhat fast. You can tell when it is searching for your data when the folder bar at the bottom displays the file currently being worked on.
Note the code options, Also: Ctrl + Break will stop the search. When the data is found you have the option of "Cancel" which ends the search at the found data File, Sheet and Cell.
Sub allFilesSearch()
'Standard Module code, like: Module1!
Dim f%, foundNum%
Dim ws As Worksheet
Dim Found As Range
Dim myText$, FirstAddress$, thisLoc$, rngNm$, AddressStr$
myText = InputBox("Enter text to find")
If myText = "" Then Exit Sub
Application.ScreenUpdating = False
With Application.FileSearch
.NewSearch
'Option: Search Sub-Folders as well?
.SearchSubFolders = False 'Option: True or False!
'Option Current Folder or a defined folder?
.LookIn = CurDir
'Or
'.LookIn = "C:\myFolderNameHere"
'Option: Only Search this type of file?
.Filename = "*.xls"
.Execute
For f = 1 To .FoundFiles.Count
Set Wb = Workbooks.Open(Filename:=.FoundFiles(f))
For Each ws In Wb.Worksheets
With ws
Set Found = .UsedRange.Find(what:=myText, LookIn:=xlValues, MatchCase:=False)
If Not Found Is Nothing Then
FirstAddress = Found.Address
Do
foundNum = foundNum + 1
rngNm = .Name
AddressStr = AddressStr & .Name & " " & Found.Address & vbCrLf
thisLoc = rngNm & " " & Found.Address
Sheets(rngNm).Select
Range(Found.Address(RowAbsolute:=False, _
ColumnAbsolute:=False)).Select
myFind = MsgBox("Found one """ & myText & """ here!" & vbCr & vbCr & _
Wb.Name & ": " & thisLoc, vbInformation + vbOKCancel + vbDefaultButton1, "Your Result!")
If myFind = 2 Then Exit Sub
Set Found = .UsedRange.FindNext(Found)
Loop While Not Found Is Nothing And Found.Address <> FirstAddress
End If
End With
Next ws
If Len(AddressStr) Then
MsgBox "Found: """ & myText & """ " & foundNum & " times." & vbCr & _
AddressStr, vbOKOnly, myText & " found in these cells"
Else:
'MsgBox "Unable to find " & myText & " in Workbook: " & Wb.Name, vbExclamation
End If
ActiveWorkbook.Save
ActiveWorkbook.Close
Next f
End With
Application.ScreenUpdating = True
End Sub