Way to Many Spead Sheets

Greg

New Member
Joined
Mar 5, 2002
Messages
1
I have currently 325 Spread sheets showing shipping data.. I got asked to find one piece of data from a job that they can not remember where or how etc.. Is there a way to batch search all my spreadsheets to find this one piece, (a text value) with out having to open up every spread sheet and doing a find?
thanks
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try doing this outside of Excel using Find / Files or Folders on the Start Menu.

Restrict the search to the folder containing the worksheets using the Browse button on the Name & Location tab.

Enter the text string you're looking for in the "Containing text:" box and search.
 
Upvote 0
Alternatively, if you do decide you want to open all these spreadsheets, I've found the code below useful in the past.

It goes thorough every Excel file in a directory you specify, does something to it (you have to put that bit in yourself), then closes it and moves it to a "Processed" directory off the path you started from.

--
Sub movestuff()

'Change the drive to whatever drive you're on
ChDrive "C"


'Define Path
MyPath = "C:temp"

'Change directory to your directory
ChDir (MyPath)

' See if a subdirectoy called "Processed" exists
MyCheckDir = Dir(MyPath & "Processed", vbDirectory)

'If it doesn't exist then create it
If MyCheckDir = "" Then
MkDir MyPath & "Processed"
End If

' Now go looking for Excel files to process
ChDir MyPath & ""
MyFile = Dir("*.xls", vbNormal)

Do While MyFile<> ""

Workbooks.Open Filename:=MyFile

'Do your stuff here...




'Switch back to the open Excel file and close it, without saving
Windows(MyFile).Activate
ActiveWorkbook.Close SaveChanges:=0

'Copy the file we've processed to the Processed Directory
FileCopy MyPath & "" & MyFile, MyPath & "Processed" & MyFile
'Delete original
Kill MyFile

' Call Dir again without arguments to return the next *.XLS file in
' the same directory.
MyFile = Dir


Loop
End Sub

--

Hope this helps.
Rgds
AJ



Please note, Where ever you see two backslashes together above, only put one in your code.
This message was edited by AJ on 2002-03-06 07:48
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,702
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top