Filter Excel Rows by Cells That Contain Specific Text

Formulas & functions · Updated November 20, 2026

To filter Excel rows by text inside a cell, turn on AutoFilter, open the filter arrow in the relevant column, then choose Text Filters > Contains and enter the text. Excel hides rows that do not match; it does not delete them, so you can restore the full list by clearing the filter.

What the Contains filter does

Excel’s Contains filter checks the values in one column and keeps rows whose cell includes the characters you specify. For example, if a Status column contains “Urgent repair,” “Not urgent,” and “Complete,” filtering for urgent returns the first two rows. The match can appear at the beginning, middle, or end of the cell; it does not have to be the whole cell value.

This is useful for lists of orders, contacts, inventory, support tickets, or other records where one field contains descriptive text. The filter applies to rows across the data range, not just to the column you opened it from. A matching row remains visible with its other columns, so you can review the full record.

Text matching in Excel’s AutoFilter is not case-sensitive: searching for “urgent” also finds “URGENT.” The filter works on the stored cell value, rather than merely on what the cell looks like after formatting. That distinction matters if a cell contains a formula, a date, or a number displayed with a custom format.

Prepare the data before filtering

Excel needs to identify the boundaries of the list so that a filter on one column keeps the corresponding information in the other columns together. A clean layout makes that easier and avoids misleading results.

  • Use one header row with a distinct label for each column, such as Customer, Description, and Status.
  • Keep each record on one row and each kind of information in its own column.
  • Avoid completely blank rows or columns within the dataset. They can cause Excel to treat part of the list as a separate block.
  • Do not merge cells in the header or data area. Merged cells can interfere with sorting and filtering.

For a frequently updated list, consider converting the range to an Excel table: select a cell in the data and choose Insert > Table, confirm whether the table has headers, and select OK. Tables add filter arrows to the header row and generally expand when you add records immediately below them. For a one-time filter, ordinary AutoFilter is sufficient.

Filter rows using Text Filters > Contains

  1. Select a cell inside the dataset. If Excel cannot detect the full range reliably, select the entire range, including its header row.
  2. On Windows, choose Data > Filter, or press Ctrl+Shift+L. Filter arrows appear in the column headers. In Excel for Mac, use Data > Filter; keyboard shortcuts can differ with the Mac keyboard and settings.
  3. Open the dropdown arrow in the column you want to search. For example, choose the Description arrow to search descriptions rather than customer names.
  4. Point to or select Text Filters, then choose Contains. Type the word or phrase in the criteria box and confirm with OK.

Excel now displays rows where that column contains the entered text. The criteria can be a word fragment, such as pack, to find “packing,” “package,” and “repack.” A phrase can narrow the results more closely. If the list is already filtered, a new filter may further limit the visible records; clear existing filters if you want to start from the complete dataset.

To show all records again, open the same column’s dropdown and choose Clear Filter From followed by the column name. You can also use Data > Clear to clear filters from the current range. Turning off Data > Filter removes the dropdown arrows, but clearing a filter is the better choice when you want to keep filtering controls available.

Choose the right text condition

Text Filters includes conditions for different kinds of searches. Contains is the natural choice when the keyword may be anywhere in the cell. “Begins With” suits prefixes such as an ID code or surname; “Ends With” can help with a suffix or file extension. “Does Not Contain” excludes rows with a particular phrase. These conditions can be more reliable than selecting values by hand when a column has many distinct entries.

For more complex criteria, open Text Filters > Custom Filter. The custom dialog can combine two conditions, using AND when both must be true or OR when either may be true. For example, to find descriptions containing either “repair” or “replacement,” choose Contains for the first condition, select OR, and set Contains for the second. If you instead choose AND, a cell must contain both terms to remain visible.

The dropdown’s search box, when available, is another way to find items in the list of distinct column values. It helps locate and select displayed values, but it is not the same as setting an explicit Contains condition. Use Text Filters > Contains when your goal is to match a fragment across cell values rather than choose particular listed entries.

Example: find matching descriptions

Suppose a worksheet has columns for Ticket, Description, and Status. The Description entries include “Urgent repair needed,” “Replacement part shipped,” “Routine inspection,” and “Urgent delivery arranged.” Applying Contains with the word urgent to Description leaves the two urgent rows visible, including each row’s ticket number and status. Searching for part would return the replacement-part description instead.

Use the column that actually holds the text you want to inspect. Searching the Status column for “urgent” will not find an urgent phrase stored only in Description. If the phrase is split across separate columns, filter each relevant column separately, or use a formula-based approach that combines the columns. Also check that the selected range includes every column belonging to each record; otherwise, a filter may appear to leave unrelated data outside the filtered block.

Use a formula when you need a separate results list

AutoFilter hides nonmatching rows in place. If you want matching records displayed in a separate area while leaving the source list intact, Excel for Microsoft 365 and Excel 2021 can use the FILTER function. The formula below is case-insensitive because SEARCH is case-insensitive.

Assume headers are in A1:C1, records are in A2:C5, and the Description text is in B2:B5. If rows 2 and 4 contain “Urgent repair needed” and “Urgent delivery arranged,” while rows 3 and 5 do not contain urgent, enter this formula in an empty area outside the source data:

=FILTER(A2:C5,ISNUMBER(SEARCH("urgent",B2:B5)),"No matches")

The returned list contains the two matching records from rows 2 and 4, across all three columns. If no description contains the word, the formula displays “No matches.” The results spill into cells below and to the right, so leave that area clear. FILTER is available in Microsoft 365 and Excel 2021 or later; older Excel versions do not support it. For a simple task in an existing list, the built-in filter is usually quicker and does not require a formula.

Why a text filter may miss rows

If an expected record does not appear, check the data and the criteria before rebuilding the filter. A cell may contain an unexpected space, a spelling variation, or a different word form. Searching for “ship” finds “shipping,” but it will not find a misspelling such as “shippng.” Copying a known word from a cell into the criteria box can help rule out typing differences.

  • Wrong column: Confirm that the filter arrow belongs to the column holding the phrase. Similar-looking columns, such as Notes and Status, are easy to confuse.
  • Incomplete range: Clear the filter, click inside the list, and check that the arrows cover the intended headers. Remove blank separators or select the complete range before applying Filter.
  • Existing filters: Another column may still have a condition, so matching rows are hidden for a separate reason. Clear all filters and apply the conditions again.
  • Mixed or unusual values: A cell may contain a formula returning text, a nonbreaking space, or characters that look like ordinary spaces. Inspect the value in the formula bar and, if necessary, clean or normalize the source data.
  • Hidden rows or grouped data: Manually hidden rows can complicate what you see. Clear the filter and check whether rows were hidden independently of AutoFilter.

Filtering changes visibility, not the underlying text. If you need to correct spelling or remove extra spaces, edit or clean the source values rather than expecting the filter to alter them. Save a copy before making broad changes to an important dataset.

AutoFilter, a table, or a formula?

Choose the method based on what you need to do with the matches. AutoFilter is best for temporarily narrowing the original list, inspecting complete records, and clearing the condition later. An Excel table is convenient for a list that grows over time because its header controls stay attached to the table. A FILTER formula is useful when a second, live results area is needed for a report or review.

There is no separate charge for using AutoFilter or Excel tables within Excel; availability depends on having access to Excel itself. Formula availability depends on the Excel version, and the FILTER function requires Microsoft 365 or Excel 2021 and later. Excel for the web also offers filtering through the column dropdowns, though exact menus and layout can vary from the Windows desktop app. For collaboration, remember that sorting or filtering a shared worksheet can affect what other people see depending on the workbook and view being used.

A filter is not a permanent deletion or a secure way to conceal confidential information. Hidden rows remain in the workbook and can be shown again. If a copy should contain only selected records, copy the visible results to a separate sheet and review that copy before sharing it; do not rely on hidden rows to protect sensitive data.

Frequently Asked Questions

How do I filter a column for text anywhere in a cell?
Open the column’s filter arrow, select Text Filters > Contains, enter the word or phrase, and select OK. Excel keeps rows with a matching value in that column.

Can Excel filter for part of a word?
Yes. Enter the fragment in the Contains criteria. For example, pack can match “packing” and “package,” because the fragment does not have to be a complete word.

Does Excel’s Contains filter distinguish uppercase and lowercase?
No. AutoFilter text conditions are not case-sensitive, so a search for “urgent” also matches “URGENT.” If case-sensitive matching is essential, use a formula-based method designed for that requirement.

How do I remove the filter without deleting rows?
Open the filtered column dropdown and choose Clear Filter From that column, or use Data > Clear to clear filters. The rows were hidden, not deleted.

Why does Contains return no results when I can see the word?
Check that you filtered the correct column, that the text is actually in the cell value, and that another active filter is not hiding the row. Extra spaces, spelling differences, or unusual characters can also prevent the expected match.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.