How to Filter an Excel Sheet by Text: Steps and Tips

Formulas & functions · Updated November 20, 2026

To filter an Excel sheet by text in Microsoft 365 for Windows, select a cell in your data and choose Data > Filter. Open the arrow in the column you want to search, choose Text Filters > Contains, enter the word or phrase, and select OK; Excel hides rows that do not match.

Apply a text filter step by step

Excel’s AutoFilter is the quickest way to show only rows whose entries match text you specify. The filter hides nonmatching rows rather than deleting them, so you can restore the full list later.

  1. Check that your data has a single header row, with a clear heading above each column, such as Product, City, or Status.
  2. Click a cell inside the data. If the data is in a table, click any table cell. Otherwise, make sure the data is arranged as one continuous range without completely blank rows or columns breaking it up.
  3. Choose Data > Filter. Excel adds a drop-down arrow to each header. On Windows, Ctrl+Shift+L also turns AutoFilter on or off. In Excel for Mac, use Data > Filter if that shortcut is not available in your keyboard setup.
  4. Open the arrow for the text column you want to filter. Choose Text Filters, then pick Contains, Begins With, Ends With, Equals, or another suitable condition.
  5. Enter the text in the filter dialog and select OK. The remaining visible rows are those that meet the condition.

For a quick selection rather than a rule, open the column arrow and type a word in its Search box. Excel narrows the list of distinct values; select the checkboxes for the values to keep and confirm. This is useful when the column contains a known set of labels, such as Open, In Progress, and Closed.

What a text filter does

A filter evaluates values in one column and controls which entire rows are displayed. For example, if a table has Customer, Region, and Order Status columns, filtering Region to show entries containing North keeps the complete records for those customers. It does not move text into a new list, change the underlying values, or remove data from the workbook.

Filters in different columns work together. If you filter Region to North and Order Status to Open, Excel shows rows that meet both active column filters. This is an AND relationship between columns. The filter arrows indicate that a column is filtered, and row numbers may skip because some rows are hidden.

Excel’s text comparisons are generally not case-sensitive, so a search for north can match North or NORTH. A filter also acts on the cell value, not simply on how the cell looks. For example, a displayed value may be affected by formatting, while the stored value remains different. This distinction matters when filtering dates, numbers, or cells with custom number formats.

Choose the right text condition

The available Text Filters conditions cover common ways to match a string. Pick the one that describes the result you want rather than selecting individual checkboxes one by one.

  • Contains: Finds a phrase anywhere within the cell. Searching for lake can match Lakeview, Lakeside, or a longer entry such as West Lake Road.
  • Does Not Contain: Keeps entries that do not include the specified phrase. This is useful for excluding a recurring tag or word.
  • Begins With: Matches text at the start of the cell, such as product codes that begin with AB.
  • Ends With: Matches text at the end, such as file names ending in .pdf or codes ending in 07.
  • Equals: Matches a whole value, such as the status Complete. Use this when a partial match would include unwanted values, such as Complete – Pending Review.
  • Does Not Equal: Excludes a particular whole value while retaining other entries.

For instance, if a City column contains New York, New Delhi, and York, Contains with New returns the first two. Begins With New also returns those two in this example, but it would exclude a value such as Old Town, New York. Equals New York keeps only the exact matching city entry.

Combine conditions in one column

To refine a single column with more than one rule, open its arrow and choose Text Filters > Custom Filter. The dialog lets you enter two conditions and choose whether the result must meet both conditions (AND) or either one (OR). For example, to find entries that contain either urgent or overdue, set two Contains conditions and choose OR. To find entries that begin with North and also contain Office, use AND.

Keep the logic in mind when combining rules. A row cannot usually satisfy both Contains urgent and Contains overdue unless both words appear in the same cell. If your goal is to show rows with one status or another, OR is usually the appropriate choice. Filters on separate columns are combined as AND even when a single column’s custom filter uses OR.

Text Filter criteria can also recognize wildcard characters. An asterisk represents any number of characters, and a question mark represents one character. A tilde lets you search for a wildcard character itself: for example, ~* represents a literal asterisk. Wildcards are helpful for variable codes, but they can produce surprising matches if the text you enter includes one unintentionally.

Prepare the data for dependable results

Filtering works best when each row is one record and each column contains one type of information. Use a header for every column and avoid merged cells in the data range. Do not leave blank rows inside the list if you expect Excel to detect the whole range automatically. If Excel filters only part of the data, select the complete range first or convert it to a table using Insert > Table.

Tables are especially useful for lists that grow over time: they include filter arrows in their headers and typically extend to include new rows added directly below them. In the Create Table dialog, check that the selected range is correct and that My table has headers is selected when the first row contains headings. Avoid putting explanatory notes or a second header row inside the list, because Excel may treat them as records.

Also check the actual cell contents. Trailing spaces can make values look alike while behaving differently in exact comparisons. A cell that appears blank might contain a space, and numbers stored as text may not behave like numeric values. If the list came from another system, inspect a few entries or clean the source data before relying on exact matches.

Fix common filtering problems

  • The filter arrow is missing: Click inside the data and choose Data > Filter. If the data is split by blank rows or columns, select the intended range first. On a protected worksheet, filtering may be unavailable unless the sheet was set up to allow it.
  • Some rows are not included: Check for blank rows, blank columns, or an incorrectly selected range. Converting the range to a table can make the intended boundaries clearer.
  • A match seems to be missing: Confirm that you chose Contains rather than Begins With or Equals. Check for spelling differences, extra spaces, or text stored in a different column. Remember that a filter applies to the cells in the selected column, not to every word on the worksheet.
  • Unexpected rows remain visible: Review other active column filters. A filter in another column may be narrowing the results further, and a custom filter may be set to OR when you intended AND, or vice versa.
  • The list looks incomplete after filtering: Clear the filter rather than assuming the hidden records were erased. Use the column arrow and choose Clear Filter From, followed by the column name, or turn off filtering with Data > Filter.

When clearing a filter, distinguish between removing one condition and removing all conditions. Clearing the filter from one column preserves filters in other columns. Turning AutoFilter off removes the arrows and restores hidden rows, but it does not delete any records.

Filter versus Find and other options

Use a filter when you want to view all matching records together and continue working with the narrowed list. Use Find when you only need to locate one occurrence or jump to a cell: press Ctrl+F on Windows, enter text, and search. Find does not hide nonmatching rows or create a filtered view.

For a one-time review, AutoFilter is usually simpler than copying matching rows elsewhere. If you need a separate, changing result list, Excel for Microsoft 365 and Excel 2021 or later also have the FILTER worksheet function, which can return records matching a condition in another area. That is a different approach from AutoFilter: it produces formula results rather than hiding source rows, and its result updates as the source data changes. Use a table or a carefully defined range for such a setup so that new records are included as intended.

Excel for the web offers filter controls as well, though the exact layout can differ slightly from the Windows desktop ribbon. On Mac, the commands are available from the Data tab; if a keyboard shortcut differs or is intercepted by macOS, use the ribbon path. In shared workbooks, remember that hiding rows with a filter changes what you see, and other collaborators may have their own view or filtering options depending on how the workbook is shared.

Frequently Asked Questions

Can I filter a cell if the text appears anywhere inside it?

Yes. Open the filter arrow for that column, choose Text Filters > Contains, and enter the text. This finds the text anywhere in the cell, not only at the beginning. Use Equals when you want the entire cell value to match.

Can I filter for two words in the same column?

Yes. Choose Text Filters > Custom Filter, add two conditions, and select AND if both must be present or OR if either can match. For example, Contains urgent OR Contains overdue can show entries containing either word.

Does filtering delete the rows that do not match?

No. AutoFilter hides nonmatching rows; it does not remove them. Clear the filter or turn off Data > Filter to show the rows again. Take care when copying visible cells or deleting rows, since those are separate actions.

Can I filter text in more than one column?

Yes. Apply a filter to each relevant column. Excel combines filters across different columns, so a row must meet the active condition in each filtered column to remain visible.

Why does Excel show unexpected matches?

Check whether the condition is Contains instead of Equals, whether another column is also filtered, and whether the criteria use AND or OR as intended. Extra spaces, inconsistent spelling, and wildcard characters can also change which entries 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.