Excel Filter Contains Text: Steps, Wildcards, and Fixes

Formulas & functions · Updated November 19, 2026

Yes. In Excel for Microsoft 365 on Windows, open the filter arrow on the text column, choose Text Filters > Contains, enter the text, and select OK. Excel then shows rows whose cell in that column includes the text you entered, even when it appears in the middle of a longer entry.

Apply a contains filter in Excel

First make sure your data is arranged in columns with a single header row, such as Product, Category, and Region. Click a cell in the data, then turn on filtering from Data > Filter. Excel adds a dropdown arrow to each header. You can also use the Windows shortcut Ctrl+Shift+L to toggle filters on or off.

  1. Select the dropdown arrow in the column you want to search, such as Product.
  2. Point to Text Filters, then choose Contains.
  3. Enter the text to find in the Custom AutoFilter box. For example, enter tea.
  4. Select OK. Rows with a matching value remain visible; rows without one are hidden.

The condition applies to one column at a time. Filtering Product for tea does not search the whole worksheet or inspect values in the Region column. To search another column too, apply a separate filter there. Excel combines filters on different columns, so a row must meet the active conditions to remain visible.

On Mac and Excel for the web, the same basic dropdown-filter approach is available, though the ribbon layout or wording can vary slightly by platform and update. On Mac, use the Data tab’s Filter command if you do not see filter arrows. In the web app, open the column dropdown and look for text-filter options. If a particular command is not shown, the dropdown search box is another practical way to narrow the visible values.

What Contains means

A contains filter tests whether the cell value includes the specified character sequence anywhere. Searching for tea can match Green tea, Teapot, and steak, because each contains those consecutive letters. It does not require the cell to equal the search term, and it does not require the term to be at the start of the cell.

Excel’s ordinary text filtering is not case-sensitive. A search for tea can therefore match Tea or TEA. It is also a literal sequence search rather than a word search: searching for art can match carton as well as a cell containing the standalone word art. If you need whole-word matching or case-sensitive matching, use a more specific formula or prepare a helper column rather than assuming the standard filter imposes those rules.

Excel filters hide rows; they do not delete the underlying values. Clearing a filter makes the hidden rows visible again. This is important when copying, editing, or reviewing a filtered list: the worksheet still contains records that are simply not on display.

Examples of text you can find

Suppose a product list includes Green tea, Tea infuser, Black tea, and Teapot. A contains filter for tea returns all four because the letters appear in each entry. A filter for black returns only Black tea. A filter for tea on a City column searches the city names instead; the same criterion is evaluated against whichever column’s dropdown you use.

Contains is useful when entries are not perfectly consistent. For instance, a supplier list might have values such as Northwind Ltd, Northwind Services, and Northwind - returns. Searching for Northwind can show all of them without requiring the full company name to match exactly. It is also handy for finding a product code embedded in a longer description or isolating rows that mention a shared category word.

For a quick one-time search, open the column dropdown and type into its search box. That box narrows the checklist of distinct values, and you can select the values you want to keep. It is not always the same thing as setting a formal Contains condition: it may help locate particular values in the list, but the Text Filters command is clearer when you want a reusable rule such as “show every entry containing this sequence.”

Wildcards and literal special characters

Excel’s text-filter criteria can use wildcard characters. An asterisk (*) represents any number of characters, while a question mark (?) represents one character. For example, a criterion like east* can match text beginning with east, and gr?y can match gray or grey. These are wildcard patterns, not ordinary punctuation when Excel interprets them as filter criteria.

A tilde (~) escapes a wildcard when you want to search for that character literally. For example, use ~* in a filter criterion to look for an asterisk in the cell text, rather than treating it as a wildcard. Similarly, ~? searches for a question mark. If the result is unexpected, check whether your entry contains a wildcard that Excel is interpreting as a pattern. For a plain search term with no wildcard characters, type the term normally in the Contains box.

Wildcards are useful for patterns, but they are not necessary for a basic contains search. You do not need to add an asterisk before and after a word when you choose Text Filters > Contains; that command already expresses the idea that the text may occur anywhere in the cell.

Combine conditions and exclude text

In the Custom AutoFilter dialog, you can set two conditions for the same column and choose whether Excel should match both or either. Use And when both conditions must be true, such as a value that contains tea and also contains green. Use Or when either condition is enough, such as a value containing tea or coffee. This gives you a way to keep a list focused without editing its source values.

To remove entries containing a term, choose Text Filters > Does Not Contain and enter the text to exclude. This hides matching rows while leaving other rows visible. You can also combine a filter on one column with one on another—for example, Product contains tea while Region equals West. The resulting view contains rows meeting both column-level filters.

Take care when using Or conditions and filters on several columns. The two conditions inside one column’s custom filter can be joined with Or, but filters applied to separate columns narrow the list together. If the result seems too small, clear one condition at a time and verify which rule is excluding the rows you expected to see.

Use a formula when you need a live result

The built-in filter is usually fastest for inspecting a list. A formula can be more useful when you want matching rows displayed in a separate area and updated as the source changes. In Microsoft 365, the FILTER function returns matching rows as a spilled result. It is also available in Excel 2021; it is not supported in every older Excel release.

Assume IDs are in A2:A7, product names are in B2:B7, and regions are in C2:C7. If the rows are 101 / Green tea / East, 102 / Coffee / West, 103 / Tea infuser / North, 104 / Black tea / West, 105 / Teapot / East, and 106 / Herbal blend / South, enter this formula in an empty cell:

=FILTER(A2:C7,ISNUMBER(SEARCH("tea",B2:B7)),"No matches")

It returns the three complete rows for IDs 101, 103, and 104. SEARCH looks for the text without distinguishing uppercase from lowercase; ISNUMBER turns successful searches into TRUE values for FILTER. In this example, Teapot does not match because its letters are teap, not the consecutive sequence tea? It does contain the sequence tea at the start, so it matches too. The accurate result is four rows: IDs 101, 103, 104, and 105. The formula spills into neighboring cells, so leave enough empty space for its output. If you need a case-sensitive formula search, FIND is case-sensitive, unlike SEARCH.

That distinction illustrates why checking the actual characters matters: Teapot begins with Tea, so it satisfies a contains search for tea. The formula and the regular text filter should both include it. Use the formula route when a live extracted list is useful; use the dropdown filter when you want to temporarily inspect or work with the original rows.

Common problems and how to fix them

  • The filter arrow is missing: Click within the data and choose Data > Filter. Check that the range has a clear header row. If the data is an Excel table, its header dropdowns are normally part of the table.
  • Some expected rows do not appear: Confirm that the term is spelled as it appears in the cells, and check for other active column filters. Remember that the filter looks for consecutive characters, not separate words or similar-looking spellings.
  • The search seems to match too much: Contains finds the sequence anywhere, including inside longer words. Try a more distinctive phrase, a different filter condition, or a helper formula if you need whole-word logic.
  • Text that looks identical behaves differently: Cells may contain extra spaces, nonprinting characters, or inconsistent punctuation. Inspect a few source cells, or clean a copy of the data before filtering if the list is imported from another system.
  • Rows remain hidden after you finish: Open the relevant dropdown and choose its clear-filter command, or use Data > Clear to clear filter criteria across the range. Turning off Filter removes the dropdowns; it is different from simply clearing a condition.
  • New records are not included: Check that the new rows are inside the filtered range. Converting a well-formed range to a table with Insert > Table can make an expanding dataset easier to manage.

Filter versus Find and other options

Use Filter when you want to keep a subset of rows visible while preserving the rest of the dataset. Use Find when you want to locate a match in a worksheet without creating a filtered view. On Windows, Ctrl+F opens Find; on Mac, Command+F is the usual equivalent. Find searches according to its options and scope, so it is not a substitute for filtering rows by a column’s values.

For a one-off scan of a small table, the dropdown search box may be enough. For repeatable review, a saved workbook with a filter applied may be convenient, though the filter state can be changed by other users. For a separate, formula-driven list of matching records, FILTER is a better fit. If you only need to visually emphasize matching cells rather than hide rows, use conditional formatting instead; highlighting and filtering solve different problems.

Excel for the web and Mac can display slightly different menus from Windows, but the core idea remains the same: apply the condition to the specific text column. If a workbook is shared, remember that filtering changes what is visible, not the data itself. In coauthoring situations, view-specific options can differ by workbook and platform, so avoid assuming another person sees precisely the same filtered view.

Frequently Asked Questions

Can I filter text that appears anywhere in a cell?
Yes. Open the column dropdown, choose Text Filters > Contains, enter the sequence, and select OK. The match can be at the beginning, middle, or end of the cell.

Is Excel’s Contains filter case-sensitive?
No. Standard text filtering treats uppercase and lowercase versions as equivalent. For case-sensitive matching, consider a formula using FIND or another specifically designed approach.

Can I filter for two words at once?
Yes. In the Custom AutoFilter dialog, add a second condition and select And if both words must appear, or Or if either word is sufficient. The words are checked against the same column.

Does Contains search every column?
No. It searches the column whose dropdown you opened. Apply additional filters to other columns if needed, or use a formula or Find when your goal is to search across a broader range.

Does filtering delete rows that do not match?
No. A filter hides nonmatching rows from the current view. Clear the filter to display them again; do not treat a filtered display as a shortened or deleted dataset.

Why does a search for tea return Teapot?
Because Teapot starts with the consecutive letters tea. Contains looks for the sequence anywhere in the cell, not only for a standalone word.

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.