ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dynamic arrays
  3. FILTER Rows That Contain Text in Excel

FILTER Rows That Contain Text in Excel

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

To filter rows that contain text in Excel, combine FILTER with ISNUMBER and SEARCH: =FILTER(A2:C8,ISNUMBER(SEARCH("desk",A2:A8))). SEARCH returns a position where the text is found and an error where it isn't, and ISNUMBER turns that into TRUE or FALSE for each row. Use FIND instead of SEARCH for a case-sensitive match. FILTER needs Excel 2021 or Microsoft 365.

Key takeaways

  • The pattern is =FILTER(data,ISNUMBER(SEARCH("text",column))).
  • SEARCH ignores case; FIND is case-sensitive. Both work inside ISNUMBER.
  • Add ISNUMBER(SEARCH(...)) tests with + for any of several words, or multiply them for all.
  • Wildcards like "desk" don't work with = inside FILTER; use SEARCH instead.
  • An empty search cell matches every row, because SEARCH("",text) returns 1.
On this page+
  1. Why can't FILTER use wildcards?
  2. How to filter rows that contain text
  3. How to make the match case-sensitive
  4. How to filter by several words
  5. How to filter rows that do not contain text
  6. How to build a search box
  7. How to filter by text without a formula
  8. Common problems with FILTER contains
  9. Practise it

To filter rows that contain text in Excel, the FILTER function needs a little help from SEARCH and ISNUMBER. =FILTER(A2:C8,ISNUMBER(SEARCH("desk",A2:A8))) returns every product with "desk" anywhere in its name. This guide explains how the pattern works, then covers case-sensitive matches, several keywords, "does not contain", and a reusable search box.

Why can't FILTER use wildcards?#

FILTER keeps rows where a test is TRUE, and an equals test only matches whole cells. So A2:A8="desk" finds cells that are exactly "desk", and A2:A8="*desk*" looks for the actual asterisks. Wildcards work in COUNTIF and XLOOKUP, but not in an = comparison.

The fix is SEARCH, which looks for text inside a cell. If you've used wildcards in criteria before, the guide to IF with text shows the same SEARCH idea in IF formulas.

All examples use this product list in A1:C8:

ABC
1ProductCategoryPrice
2Standing deskFurniture349
3Desk lampLighting39
4Office chairFurniture189
5Monitor armAccessories59
6Desk organiserAccessories25
7Floor lampLighting79
8Laptop standAccessories45

How to filter rows that contain text#

Combine three functions, from the inside out:

Excel formula
=FILTER(A2:C8,ISNUMBER(SEARCH("desk",A2:A8)))
  1. SEARCH("desk",A2:A8) looks for "desk" in each product name. It returns the position where it's found, such as 10 for "Standing desk" and 1 for "Desk lamp", or #VALUE! where it isn't.
  2. ISNUMBER(...) turns each result into TRUE (a number, so found) or FALSE (an error, so not found).
  3. FILTER(A2:C8,...) keeps the rows where the test is TRUE.

The result is three rows: Standing desk, Desk lamp and Desk organiser. SEARCH ignores case, so "Desk" and "desk" both match.

FILTER needs Excel 2021, Excel 2024 or Microsoft 365. The results spill into the cells below and to the right, so keep that area empty. The FILTER function guide and the SEARCH function guide cover each function on its own.

How to make the match case-sensitive#

Swap SEARCH for FIND. The two work the same way, except FIND matches capitals exactly and doesn't accept wildcards:

Excel formula
=FILTER(A2:C8,ISNUMBER(FIND("Desk",A2:A8)))

Now the result is Desk lamp and Desk organiser. "Standing desk" is left out because its "desk" is lowercase. Use FIND when capitals carry meaning, such as product codes where "AB" and "ab" are different. For ordinary product names and descriptions, SEARCH is usually the better choice, because people rarely type capitals consistently. The comparison of FIND and SEARCH explains the other differences.

How to filter by several words#

Add the tests for OR, and multiply them for AND, just as with any FILTER with more than one condition.

Contains desk or lamp:

Excel formula
=FILTER(A2:C8,ISNUMBER(SEARCH("desk",A2:A8))+ISNUMBER(SEARCH("lamp",A2:A8)))

This returns four rows: Standing desk, Desk lamp, Desk organiser and Floor lamp. Desk lamp matches both words but appears only once.

Contains desk and costs under 100:

Excel formula
=FILTER(A2:C8,ISNUMBER(SEARCH("desk",A2:A8))*(C2:C8<100))

This returns Desk lamp (39) and Desk organiser (25). The guide to FILTER with multiple criteria explains why + means OR and * means AND.

How to filter rows that do not contain text#

Wrap the test in NOT to flip TRUE and FALSE:

Excel formula
=FILTER(A2:C8,NOT(ISNUMBER(SEARCH("desk",A2:A8))))

The result is every product without "desk": Office chair, Monitor arm, Floor lamp and Laptop stand. ISERROR gives the same result in one step, ISERROR(SEARCH("desk",A2:A8)), because SEARCH returns an error exactly where the word is missing.

How to build a search box#

Point SEARCH at a cell, so anyone can type a word and see matching rows. If E1 is the search box:

Excel formula
=FILTER(A2:C8,ISNUMBER(SEARCH(E1,A2:A8)),"No matches")

Type "lamp" in E1 and the list shows the two lamps. Type "stand" and you get Standing desk and Laptop stand, because "stand" appears inside both names. The third argument shows "No matches" instead of #CALC! when nothing is found.

One surprise: if E1 is empty, every row appears. SEARCH treats empty text as found at position 1, so every test is TRUE. That's often what you want for a search box, a full list until someone types.

To match only names that start with the search word, compare the first characters instead: =FILTER(A2:C8,LEFT(A2:A8,LEN(E1))=E1). With "desk" in E1, that returns Desk lamp and Desk organiser, but not Standing desk.

How to filter by text without a formula#

If you only need a quick look, use the filter buttons instead. Select the table, press Ctrl+Shift+L (Mac: ⌘+Shift+F), click the arrow on the Product column, and choose Text Filters > Contains. Type "desk" and click OK.

This hides the other rows in place rather than copying matches somewhere else. It works in every Excel version, but it doesn't update when the data changes, and it can't feed other formulas. To total the matching rows with a formula, see using FILTER with SUM. To filter on dates, see filtering by date.

Common problems with FILTER contains#

Most problems come from the error-handling step or the spill area. Check these:

  1. Missing ISNUMBER. FILTER(A2:C8,SEARCH("desk",A2:A8)) returns an error, because the SEARCH errors pass straight through.
  2. #CALC! Nothing matched. Add a third argument such as "No matches".
  3. #SPILL! Cells in the result area aren't empty. Clear them.
  4. Too many matches. Short words match inside longer ones: "arm" also finds "Farm" or "Warm". Add spaces, like " arm", or use FIND for exact capitals.
  5. #NAME? Your Excel is older than 2021 and doesn't have FILTER. Use the filter buttons instead.

Practise it#

Text searches with FILTER are a common task in data analyst tests, and they combine two skills at once. Practise the FILTER function in a live spreadsheet, then practise FIND and SEARCH to master text matching. Each formula is checked instantly. Or try the exercise on this page first.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

List every product with lamp in its name. Click E2 and use FILTER on A2:A8, with ISNUMBER(SEARCH("lamp",A2:A8)) as the condition.

fx
ABCDEF
1
Product
Category
Price
2
Standing desk
Furniture
349
3
Desk lamp
Lighting
39
4
Office chair
Furniture
189
5
Monitor arm
Accessories
59
6
Desk organiser
Accessories
25
7
Floor lamp
Lighting
79
8
Laptop stand
Accessories
45
9
10
11

Tip: SEARCH finds lamp in each name, ISNUMBER turns the results into TRUE or FALSE, and FILTER keeps the TRUE rows.

Practise this in a lesson

LessonFILTER: pull matching rows with a formulaReturn every row that meets one or more conditions with FILTER, and show a friendly message when nothing matches.LessonFIND and SEARCHLocate a character or word inside text with FIND or SEARCH, then use that position to split names and pull out order numbers.Function guideFILTERReturn every row that matches a condition with Excel's FILTER. Multiple criteria, empty results and #SPILL! explained, with live practice.Function guideSEARCHLocate text regardless of capitals with Excel's SEARCH, use wildcards, and build "contains" checks with ISNUMBER. Examples and live practice.

Frequently asked questions

How do I filter cells that contain specific text in Excel?

+

Use =FILTER(A2:C8,ISNUMBER(SEARCH("desk",A2:A8))). It returns every row where column A contains desk anywhere in the cell, in any case.

Can I use wildcards in the FILTER function?

+

Not with an equals test. A2:A8="desk" looks for the literal text with asterisks. Use ISNUMBER(SEARCH("desk",A2:A8)) to match text anywhere in the cell.

How do I filter rows that do not contain a word?

+

Wrap the test in NOT: =FILTER(A2:C8,NOT(ISNUMBER(SEARCH("desk",A2:A8)))). It keeps every row where desk doesn't appear.

How do I make a FILTER contains search case-sensitive?

+

Use FIND instead of SEARCH: =FILTER(A2:C8,ISNUMBER(FIND("Desk",A2:A8))). FIND only matches the exact capitals you type.

How do I filter by text without a formula?

+

Turn on the filter buttons with Ctrl+Shift+L (Mac: ⌘+Shift+F), click the arrow in the column header, choose Text Filters > Contains, and type the word.

Sources

  • FILTER function - Microsoft Support
  • SEARCH, SEARCHB functions - Microsoft Support
  • IS functions - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. Why can't FILTER use wildcards?
  2. How to filter rows that contain text
  3. How to make the match case-sensitive
  4. How to filter by several words
  5. How to filter rows that do not contain text
  6. How to build a search box
  7. How to filter by text without a formula
  8. Common problems with FILTER contains
  9. Practise it

Keep reading

Dynamic arrays· 6 min read

The FILTER Function in Excel (With AND and OR)

FILTER returns every row of a range that passes a test: =FILTER(A2:C9,B2:B9="East"). The matching rows spill into the cells below and update when the data changes. For AND, multiply tests in brackets; for OR, add them. The third argument shows a message when nothing matches. FILTER needs Excel 2021, Excel 2024 or Microsoft 365.

Logic· 6 min read

IF With Text in Excel: Check Words and Partial Matches

To check if a cell equals a word, use =IF(A2="Paid","Done","Chase"). To check if a cell contains a word anywhere, use =IF(ISNUMBER(SEARCH("refund",B2)),"Refund","Other"). SEARCH finds the word's position or returns an error, and ISNUMBER turns that into TRUE or FALSE. Wildcards like * don't work with = inside IF.

Dynamic arrays· 6 min read

Sum, Count or Average FILTER Results in Excel

To sum FILTER results in Excel, put FILTER inside SUM: =SUM(FILTER(D2:D9,B2:B9="East")) adds the sales of East rows only. Swap SUM for COUNT, AVERAGE or MAX for other answers. Add 0 as FILTER's third argument so no matches return 0 instead of #CALC!. To total rows left visible by the filter buttons, use =SUBTOTAL(109,D2:D9).

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free