Filter Excel Data by Text: Steps and Useful Options

Formulas & functions · Updated November 20, 2026

To filter Excel data by text in Microsoft 365 for Windows, select a cell in your data, choose Data > Filter, open the arrow in the column heading, then choose Text Filters and a condition such as Contains or Begins With. Enter the text and select OK; Excel hides rows that do not match, without deleting them.

How text filtering works

Excel’s built-in AutoFilter lets you show only rows whose values in a chosen column meet a condition. It is useful for narrowing a customer list to a city, finding product descriptions that include a word, or displaying records whose codes start with a particular prefix. The filter applies to rows, so values in other columns on each matching row stay visible together.

Filtering is different from sorting and from deleting data. Sorting changes row order; filtering temporarily hides rows that do not meet the selected criteria. The hidden records remain in the worksheet and can be shown again by clearing the filter. This makes filtering a safe way to inspect a subset of a list without creating a separate copy.

Excel’s filters generally do not distinguish uppercase from lowercase. For example, a Contains condition for north will ordinarily match North, NORTH, and north. If case matters, use a formula-based approach or another carefully designed method rather than assuming the standard filter is case-sensitive.

Prepare the data before filtering

Filters work best when the data is arranged as a simple list: one header row, one type of field per column, and one record per row. Avoid blank rows or columns inside the list, merged cells in the header, and multiple header rows. A clear header such as City or Description helps you identify the correct filter arrow.

Click a cell inside the list before turning on the filter. Excel usually detects the surrounding data range, but blank rows or columns can cause it to select only part of the list. If the data is an Excel Table, clicking inside it and choosing Data > Filter is usually unnecessary because tables have filter arrows in their headers by default. Tables also expand more reliably when new records are added.

Check that a column contains the kind of values you expect. A column that looks like text may contain numbers stored as text, extra spaces, or inconsistent spellings. Those differences can create separate entries in the filter checklist or prevent a value from matching the condition you intended.

Apply a text filter step by step

  1. Click a cell in the range or table. If the range has no filter arrows, select Data > Filter.
  2. Open the drop-down arrow in the heading of the text column you want to inspect.
  3. Point to or select Text Filters. Choose a condition such as Contains, Does Not Contain, Begins With, Ends With, Equals, or Does Not Equal.
  4. Enter the text in the filter dialog. Review the condition and select OK.

For example, suppose a Product column contains items such as Green tea, Green mug, and Black tea. Choosing Text Filters > Contains and entering tea displays Green tea and Black tea, but not Green mug. Choosing Begins With and entering Green displays both Green items, regardless of what follows the word.

The drop-down also has a search box and a checklist of distinct values. Searching there can be quicker when you want an exact listed value, such as a particular department name. The checklist selects values rather than expressing a general rule: use Text Filters when the goal is to match a pattern or part of a value.

Choose the right text condition

Each condition answers a slightly different question. Equals is appropriate when the whole cell should match the entered text; Contains looks for that text anywhere in the cell. Begins With and Ends With are useful for consistent prefixes and suffixes, such as ticket codes or file extensions. The negative conditions are helpful for excluding a known word or value.

  • Use Contains to find descriptions mentioning a term, such as delayed.
  • Use Begins With to show invoice numbers sharing a prefix, such as INV-.
  • Use Ends With to find entries with a shared ending, such as a particular domain suffix.
  • Use Equals for a complete text value, such as West Region.
  • Use Does Not Contain to exclude rows with a particular phrase.

Excel can also offer Custom Filter, which lets you set two conditions for the same column. Choose whether both conditions must be true (And) or either one can be true (Or). For instance, a Notes column can be filtered to contain urgent or contain review. Selecting And for those two different terms would usually return no rows, because a cell must contain both.

Use wildcards for flexible matches

Wildcard characters let a text criterion stand for more than one possible value. An asterisk (*) represents any number of characters, including none; a question mark (?) represents exactly one character. For example, a criterion like AB* can match AB-14 and ABX, while AB-? can match AB-7 but not AB-17.

Use wildcards when the format is predictable but the full value varies. A search for *street can match values ending in street, while Mar* can match names or labels beginning with Mar. Keep in mind that a broad wildcard can return more rows than expected. If the criterion needs to match a literal asterisk or question mark rather than use it as a wildcard, place a tilde (~) before that character.

Filter more than one column

You can filter multiple columns at the same time. For example, filtering Region to equal West and filtering Status to contain open displays rows meeting both column filters. In ordinary AutoFilter use, conditions across different columns combine as an intersection: a row must pass every active column filter to remain visible.

This is different from choosing Or within a Custom Filter for one column. That Or offers alternatives within that column, while a filter applied to another column still narrows the results. If a result seems too small, check every column heading for an active filter indicator and consider whether a condition was set to And instead of Or.

Filters can be layered with sorting. You might first filter a Status column to show open records, then sort the remaining rows by date. Sorting does not remove the active filter; clearing the filter later restores the other rows, while the sort order may remain.

Handle blanks and inconsistent text

To show empty cells or nonempty cells, open the column’s filter menu and use the relevant checklist option, often labeled (Blanks) or (Nonblanks). The exact checklist depends on the values in that column. A cell containing a space is not truly blank, and a formula that displays an empty string may not behave like a physically empty cell in every filtering situation.

Extra spaces are a frequent reason a text filter misses an apparent match. For example, a value that appears as West may actually have a trailing space. Inconsistent punctuation, abbreviations, and spelling also matter: North-East and Northeast are different text values. If the list comes from an export, consider cleaning or standardizing it before relying on exact matches.

When a number-like code is stored as a number in some rows and as text in others, the filter menu may group or treat entries differently. Postal codes, product IDs, and leading-zero identifiers are often better stored consistently as text. Avoid changing a source column casually if its values are used in formulas or imported again; make a cleaned helper column when preserving the original data matters.

Clear or change a filter

To remove a filter from one column while keeping other column filters, open that column’s menu and choose Clear Filter From followed by the column name. To show all rows again, use Data > Clear when the filter range is active. The arrows can remain visible after the criteria are cleared.

To turn off the filter arrows, choose Data > Filter again. This toggles filtering for the selected range or table; it does not delete the rows that had been hidden. If you are unsure whether records are hidden, check for filter indicators in the headings or clear the filters before copying or printing the full list.

When a formula is a better alternative

AutoFilter is convenient for interactive inspection, but a formula can produce a separate, automatically updating result list. In Excel for Microsoft 365 or Excel 2021 and later, the FILTER function can return rows matching a condition. This is useful when you want the original list and a visible filtered output side by side.

With records in A2:C100 and the text to search in the Description column C, enter this formula in an empty area outside the source data:

=FILTER(A2:C100,ISNUMBER(SEARCH("urgent",C2:C100)),"No matches")

SEARCH checks for urgent anywhere in each description and is not case-sensitive; ISNUMBER identifies the rows where SEARCH finds it. FILTER returns the corresponding full rows from columns A through C. If no description contains urgent, the formula displays No matches. The result spills into adjacent cells, so leave enough empty space for the returned rows and columns. This formula is an alternative, not a replacement for the header drop-down: it creates a formula result rather than hiding source rows.

Common problems and practical checks

If the filter arrow is missing, click in the data and choose Data > Filter. If only some rows respond, check for a blank row or column that split the list, then reapply the filter to the complete range. A Table can help keep the range together as it grows.

If expected matches do not appear, verify the selected column, the condition, and the spelling of the entered criterion. Clear other active filters to see whether they are excluding the rows. Also check for leading or trailing spaces and for cells that contain formulas returning text. If you are filtering a long list with many distinct values, use the search box in the drop-down or use a Text Filters condition rather than scrolling the checklist manually.

The Windows ribbon path described above also applies to Excel for Mac, although the ribbon layout and dialog appearance can differ. Excel for the web provides filtering through the Data tab and column drop-downs as well, but some dialogs and advanced options may look different. If a command is not where expected, the column’s filter arrow is the most direct place to open its available conditions.

Frequently Asked Questions

Can I filter Excel cells by a word inside the text?
Yes. Open the column arrow, choose Text Filters > Contains, enter the word, and select OK. Excel displays rows where that column’s value contains the entered text.

How do I filter text that starts with certain letters?
Choose Text Filters > Begins With from the relevant column menu, then enter the starting characters. For a pattern with variable characters, a wildcard such as AB* can also be useful.

Can Excel filter by two words?
Yes. Use Text Filters > Custom Filter to set two conditions for one column and choose And or Or. Use Or to match either term; use And when a cell must satisfy both conditions.

Does Excel text filtering distinguish capital letters?
Standard AutoFilter text conditions are generally case-insensitive. A condition for north typically matches North and NORTH as well as lowercase north.

Does filtering delete the rows that do not match?
No. A filter hides nonmatching rows temporarily. Clear the filter to display them again; use deletion commands only if you intentionally want to remove data.

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.