Function Problems

Search Anywhere Within a Cell Using an Excel FILTER Formula

Ayan MasoodAyan Masood Dec 2, 2026 868 views

Question details

Create a search box that returns Excel rows when a search term appears anywhere within a cell.

Search Anywhere Within a Cell Using an Excel FILTER Formula
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.
Before you start

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.

Solution 1Recommended

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.

1
Set up the table

Select your data and choose Insert > Table. For this example, name the table Table1 and use FileName as the column to search.

2
Enter a search term

Type the text you want to find in cell H2. It can appear anywhere within a FileName cell.

3
Add the formula

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.

4
Change the search

Edit the text in H2 to update the results. If no rows match, the formula displays No Results.

Use FILTER and SEARCH to match text anywhere
Case sensitivity and blank searches: Replace SEARCH with FIND for a case-sensitive search. If H2 is blank, the formula returns all rows.
Search in WPS Spreadsheet

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. 1. Open the workbook: Open WPS Spreadsheet and select Open to load your Excel workbook.
  2. 2. Enable filters: Select a cell in the data range, then choose Data > Filter.
  3. 3. Set a text condition: Open the filter arrow on the column you want to search and choose Text Filters > Contains.
  4. 4. Apply the search: Enter your search term and select OK to show matching rows.
Find text anywhere within a filtered cellOpen and edit Microsoft Excel XLS and XLSX filesUse a familiar spreadsheet interfaceFilter a list without creating a separate results area
microsoft office alternative - wps office

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.