I'm using Microsoft Office 2007. How can I search inside multiple Excel files?


Solution 1:

With the folder that houses the files open, press Ctrl+f to use the search box in the folder. Then search for

content:"my string to search for"

to search for that string in the files in the current directory.

Solution 2:

After searching online, I found there was no one universal solution for the problem of searching multiple excel spreadsheets online, so I decided to write my own excel spreadsheet that searches other excel spreadsheets, that can be found here.

Please note it's only been tested in Excel 2010, but it should work in 2007 and earlier versions. If not, feel free to modify the code how you see fit.

The spreadsheet makes use of a custom userform and makes use of VBA code (which you're welcome to use for any purpose). Naturally, macros etc have to be enabled for this to work, and the form appears upon opening the spreadsheet (you can access the code by pressing Alt + F11, going to the userform, and double-clicking the 'Begin Search' button in the design window).

Full explanation of functions and features can be found on the Github readme, but it basically allows you to specify two text search terms to search for within a specified directory (that you can navigate to), it can search said directory recursively, and open spreadsheets that are password protected (so long as you provide the password).

It will search individual sheets in each workbook on a cell level search. Depending on workbook size, it can take roughly a second to scan each workbook.

It displays all search results in a side window, including any spreadsheets it failed to open. These results can be saved to a text file for later reference.

The userform should be relatively self-explanatory, however the readme for it on Github goes into great depth on how to use. Again, free to use, it's open-source.