Search Anywhere Within a Cell Using an Excel FILTER Formula
Question details
Create a search box that returns Excel rows when a search term appears anywhere within a cell.

- Product
- Microsoft Excel 365
- Device & OS
- not provided
- Scenario
- The user wants to filter a list of file names using a search term entered in a worksheet cell.
- Observed behavior
- Matching rows should appear whether the search term occurs at the beginning, middle, or end of the cell text.
Identify the table and column you want to search, and choose an empty cell for the search term. Leave enough empty cells below and beside the formula for the filtered results to spill.
Use FILTER and SEARCH to match text anywhere
Use this formula to return matching table rows as the search term changes.
SEARCH finds text at any position and is not case-sensitive. ISNUMBER converts successful matches into TRUE values that FILTER can use.
Select your data and choose Insert > Table. For this example, name the table Table1 and use FileName as the column to search.
Type the text you want to find in cell H2. It can appear anywhere within a FileName cell.
In an empty cell outside the table, enter =FILTER(Table1,ISNUMBER(SEARCH($H$2,Table1[FileName])),"No Results"). Replace Table1, FileName, and H2 with your actual table name, column name, and search cell.
Edit the text in H2 to update the results. If no rows match, the formula displays No Results.

Use Excel's Contains filter for a quick one-time search
Use the column filter when you want to filter the existing list without creating a separate results area.
Find text anywhere in a column with WPS Spreadsheet
Use a text filter in WPS Spreadsheet to show rows containing your search term, without building a formula.
- 1. Open the workbook: Open WPS Spreadsheet and select Open to load your Excel workbook.
- 2. Enable filters: Select a cell in the data range, then choose Data > Filter.
- 3. Set a text condition: Open the filter arrow on the column you want to search and choose Text Filters > Contains.
- 4. Apply the search: Enter your search term and select OK to show matching rows.

Frequently Asked Questions
How do I make the search case-sensitive?
Replace SEARCH with FIND in the formula: =FILTER(Table1,ISNUMBER(FIND($H$2,Table1[FileName])),"No Results"). FIND distinguishes uppercase from lowercase.
What happens when the search cell is empty?
The formula returns all rows because SEARCH treats an empty search term as a match. Enter text in H2 to narrow the results.
Why does the formula show a #SPILL! error?
The results need an unobstructed area outside the table. Clear any cells blocking the spill range, or move the formula to an empty area.
Can I search without creating a formula?
Yes. In Excel, select Data > Filter, open the target column's filter arrow, and choose Text Filters > Contains. Enter the term and select OK.




