To exclude rows containing particular text in Excel for Microsoft 365 on Windows, open the column’s filter arrow, choose Text Filters > Does Not Contain, enter the text, and select OK. Excel hides matching rows without deleting them; the filter can be cleared whenever you want to see the full list again.
What excluding text means in Excel
Excel’s built-in filter works on the values in a column. The Does Not Contain condition keeps rows whose cell does not include the text you specify, even if that text is only part of a longer entry. For example, excluding draft from a Status column filters out both Draft and Draft review, while leaving Approved visible.
This is a view of the data, not a deletion. Filtered rows remain in the worksheet and can still be restored by clearing the filter. That distinction matters if you plan to copy, count, or calculate from the results: some worksheet operations treat hidden rows differently, so check the function or command you use.
Text filters are generally not case-sensitive. Searching to exclude draft also excludes entries such as DRAFT. The filter applies to the selected column, not to every cell in the row. If you need to exclude records based on a different column, apply a filter to that column too.
Apply Does Not Contain step by step
- Make sure the data has a header row, such as
Product,Status, andRegion. Remove completely blank rows or columns inside the data block if they could split it. - Click a cell in the data, or select the range you want to filter. If the range is formatted as an Excel table, its headers usually already have filter arrows.
- On the Windows ribbon, choose Data > Filter if the arrows are not already visible. For a table, you can also use the arrow in the relevant header.
- Open the filter arrow for the column you want to check. Choose Text Filters > Does Not Contain.
- Type the text to exclude in the filter dialog and select OK. Excel displays rows that meet the condition and hides matching rows.
For example, if the Category column contains Office supplies, Office furniture, and Food, entering Office excludes the first two because both contain that sequence of letters. It does not require the cell to equal the search term exactly.
Exclude more than one text term
The custom text filter dialog can combine two conditions for the same column. To remove rows containing either draft or cancelled, set the first condition to Does Not Contain draft, choose And, then set the second condition to Does Not Contain cancelled. A row must pass both conditions to remain visible, so a cell containing either term is excluded.
The choice between And and Or changes the result. With two “does not contain” conditions, And is usually appropriate when the goal is to exclude either term. Or keeps a row if it satisfies at least one condition; a cell containing one of the terms may still pass because it does not contain the other. If you have many terms, use a formula or a helper column rather than building a long set of conditions.
Filters on different columns combine as well. If Status is filtered to exclude draft and Region is filtered to show only West, the visible records must satisfy both column filters. To remove a filter from one column without resetting the others, use that column’s menu and choose Clear Filter From followed by its header name.
Exclude an exact value instead of a phrase
Use Text Filters > Does Not Equal when you want to exclude a cell whose entire value matches a particular entry. For instance, Does Not Equal Draft excludes a cell containing only Draft, but it can leave Draft review in the results. Does Not Contain excludes both because the word appears in each.
This distinction is useful for codes, labels, and names. If a Product column has AB-12 and AB-120, excluding the substring AB-12 can remove both. To target only the complete value AB-12, use Does Not Equal. If values include extra spaces or inconsistent spelling, clean the source data first; a filter will not automatically treat differently typed text as identical.
What happens to blank cells?
A blank is not the same as a cell containing a word, so check how blanks appear after applying a text condition. The filter menu also has a checklist of values, which may include (Blanks). If empty cells should remain in the output, make sure that choice is included; if they should be excluded, clear it. The checklist and the text condition work together, so the visible result can depend on both.
Also distinguish a truly empty cell from a formula that displays an empty string. A cell containing a formula such as one that returns "" is not necessarily an empty cell for every Excel operation. If blank handling is important for a report, test a few known rows and consider adding a helper column that explicitly labels blank and nonblank values.
Use a formula when you need a separate result
A filter hides rows in place. If you need a live, separate list that updates when source data changes, Excel for Microsoft 365 includes the FILTER function. For example, assume the records are in A2:C5, the status text to test is in B2:B5, and the four statuses are Approved, Draft, Approved, and Draft review, in that order. Enter this formula in an empty area:
=FILTER(A2:C5,ISERROR(SEARCH("draft",B2:B5)),"No matches")
In that layout, the formula returns the first and third records, the two with Approved status, because neither status contains draft. SEARCH looks for the text without regard to capitalization; it returns an error when the text is not found, and ISERROR turns that result into the TRUE/FALSE inclusion test used by FILTER. The final argument displays No matches if no rows qualify. The result spills into nearby cells, so leave enough empty space for it.
FILTER is available in Microsoft 365 and Excel 2021 or later. It is not a replacement for the ordinary column filter in every situation: it creates a formula result rather than hiding source rows, and the spill area cannot contain other data. For a one-time inspection or quick cleanup, the ribbon filter is simpler.
Advanced Filter for reusable criteria
Excel’s Advanced Filter is another option when you need a criteria range, want to copy matching rows to another location, or are building a more structured extraction. On Windows, open Data > Advanced in the Sort & Filter group. The source range should include its headers, and the criteria range needs a header that matches the source column header exactly.
For a criterion that excludes text occurring anywhere in a cell, an Advanced Filter criteria cell can use a wildcard condition such as <>*draft* beneath the matching header. The asterisks represent any characters before or after the word. Because Advanced Filter criteria syntax is less familiar and blank values can affect results, verify the output against a few known rows before relying on it. For a simple exclusion, the ordinary Does Not Contain menu is easier to understand.
Common problems and useful checks
- No filter arrows appear: Click within the data and choose Data > Filter. Check that the range has a clear header row and is not separated by blank rows or columns.
- Some matching rows remain: Confirm that you filtered the right column and used Does Not Contain, not Does Not Equal. Check for spelling variations, extra spaces, and additional filter conditions on other columns.
- Too many rows disappear: Your search may be a substring shared by unrelated values. Use a more specific phrase or switch to Does Not Equal if you mean a complete-cell match.
- The results seem incomplete: Another column may still have an active filter. Open its arrow and inspect the selected values, or use Data > Clear to clear filters across the range.
- You think rows were deleted: Look for a filter icon in the header and clear the filter. Filtering hides records; it does not remove them from the workbook.
Windows, Mac, and Excel for the web
The steps above use Microsoft 365 for Windows. Excel for Mac also provides column filter menus and text-filter conditions; ribbon placement and dialog appearance can vary slightly by release, but look for the filter arrow and the Text Filters menu. Excel for the web has filter arrows and text-filter options as well, though some advanced features and controls may differ from the desktop interface.
On Windows, Ctrl+Shift+L toggles AutoFilter for the current data range. On Mac, the equivalent shortcut is commonly Command+Shift+F; keyboard shortcuts can vary with keyboard layout and Excel settings. If a shortcut does not work, use Data > Filter instead. On the web, use the ribbon command or the header arrow rather than relying on a desktop shortcut.
Frequently Asked Questions
How do I filter out a word in Excel?
Open the filter arrow on the relevant column, choose Text Filters > Does Not Contain, enter the word, and select OK. Excel hides rows where that column contains the word.
Can I exclude several words at once?
Use the two-condition custom text filter and join two Does Not Contain rules with And. For a longer list of terms, a helper column or a FILTER formula may be easier to maintain.
Does Does Not Contain match part of a cell?
Yes. It checks for the text anywhere in the cell, so excluding cat can also exclude catalog. Choose Does Not Equal when you mean to compare the full cell value.
Can I exclude text without deleting the rows?
Yes. A normal filter only hides nonmatching rows. Clear the filter to show them again; use a separate formula result if you need a distinct list of qualifying records.
Why are blank cells still showing?
Blank cells may be controlled separately through the filter’s value checklist. Check whether (Blanks) is selected, and remember that a formula displaying an empty string may not behave exactly like a truly empty cell.
Related
- Excel Data Validation List: Keep Dropdowns in A-to-Z Order
- Excel Data Validation List Auto Update: How to Set It Up
- Excel Data Validation Lists: Add New Items in Excel
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Checklist Examples in Excel: Templates and FormulasUseful checklist examples in Excel include task lists, inspections, inventory counts, event plans, and habit trackers. For a…
- SUMIF With Multiple Criteria: Examples and AlternativesFor multiple criteria in Excel, use SUMIFS rather than SUMIF. With dates in A2:A8, regions in B2:B8, products…
- Excel Link to Named Range: Formulas and MethodsTo create a clickable link to a named range in Excel for Microsoft 365 on Windows, use the…
- Excel IFS in Conditional Formatting: How to Use ItYes. In Excel for Microsoft 365 on Windows, you can use the IFS function in a conditional-formatting formula,…
- Excel Age from Date of Birth with DATEDIF ExplainedTo calculate age in completed years in Excel, put the date of birth in A2 and enter =DATEDIF(A2,TODAY(),"Y")…
- COUNTIF Excel: Count Dates by Day, Month, or RangeYes. Excel’s COUNTIF function can count dates that match a specific day or a condition such as before…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.