Field Guide

How to filter data in Excel: AutoFilter and filter by value

Updated

To filter data in Excel, select a cell inside your data, then on the Data tab select Filter (the full ribbon path is Data > Sort & Filter > Filter). A dropdown arrow appears on every column header. Select the arrow on the column you want to narrow, then choose which values or condition to show. Filtering hides the rows that do not match and keeps the ones that do, so nothing is deleted, and clearing the filter brings every row back.

AutoFilter is the built-in way to show part of a range and hide the rest without touching the data underneath. The sections here cover turning filters on, filtering by checking values off a list, filtering by a text, number, or date condition, filtering by color, stacking filters across several columns, and clearing or reapplying them, plus the point that trips people up: a filter hides rows, it does not remove them.

How do I turn on filters in Excel?

Select any cell inside the range, then on the Data tab select Filter. That button lives in the ribbon’s Sort & Filter group, so you may see the path written as Data > Sort & Filter > Filter. A small dropdown arrow appears on each column header, and each arrow opens that column’s filter menu.

The same command sits on the Home tab as well: Home > Editing > Sort & Filter opens a menu that holds Filter alongside the sort and Reapply commands. Either route toggles the arrows on.

If your data is already formatted as an Excel table, you do not need the toggle at all. Filter controls are added to the table’s header row automatically the moment the table is created.

How do I filter by a specific value?

Choosing values off the list is the quickest filter. Select the header arrow for the column you want to narrow, and Excel lists every value in that column with a check box. Clear the (Select All) box to uncheck them all at once, then check only the values you want on screen and select OK. To find a value in a long list, type it into the Search box above the check boxes.

Once a filter is applied, the column’s dropdown arrow changes to a small filter icon, the sign that this column is narrowing the range. Hover over it and Excel shows a screen tip describing the filter applied to that column.

A B C
1 Region Rep Q1 sales
3 West Ramirez 4,200
5 West Osei 3,800
7 West Nowak 5,100
Region in column A is filtered to West. Rows 2, 4, and 6 hold East and South data and stay hidden, not deleted, so the row numbers jump from 1 to 3 to 5 to 7. The shaded cells are the West values that pass the filter.

How do I filter by a text, number, or date condition?

When checking values off a list is not enough, filter by a condition instead. Open the column’s arrow and, depending on what the column holds, Excel offers Text Filters, Number Filters, or Date Filters. Point to one and pick a comparison:

You can combine two conditions on the same column with the And button, so both must be true, or the Or button, so either one qualifies. Excel offers one filter type per column, chosen by whichever data type appears most in it, so keeping a column to a single kind of data gives you predictable options.

Two of the number filters behave unlike the rest. Top 10 and Above Average are measured against the original range, not the rows an earlier filter left behind, so the top ten always means the top ten of the whole column rather than of the current subset.

On a Mac the same conditions are reached a little differently: open the column’s Filter menu, select Choose One, and pick the comparison there, rather than through separate Text Filters and Number Filters submenus.

How do I filter by cell or font color?

If a column carries color, whether you applied it by hand or through conditional formatting, you can filter on it. Click a cell that has the color you want, open that column’s Filter arrow, and under Filter open the By color menu. Choose Cell Color, Font Color, or Cell Icon, then pick the color to keep. Excel shows only the rows whose cell in that column carries it.

How do I filter more than one column at once?

Filter one column, then open a second column’s arrow and filter it too. Excel keeps both. Microsoft’s rule for stacked filters is that “Filters are additive, which means that each additional filter is based on the current filter and further reduces the subset of data.” Each column you filter narrows what is already on screen, so the columns combine with AND: a row has to pass every active filter to stay visible.

One effect of that stacking: once a column is filtered, the choices offered in another column’s list are only the values still visible in the current subset, not every value the column originally held. Clear the filters if you need the full set of choices back.

How do I clear a filter or show all rows again?

There are three levels, depending on how much you want to undo.

To refresh a filter after the data behind it changed, use Reapply: on the Home tab, select Editing > Sort & Filter > Reapply. Reapplying matters when rows were added or edited, when a formula recalculated, or when the filter is a moving date range like This Week, because the visible set can be out of date until you reapply it.

Does filtering delete the hidden rows?

No. A filter only hides rows; the data is all still there. Microsoft’s description is direct: “When you filter data, entire rows are hidden if values in one or more columns don’t meet the filtering criteria.” Hidden means hidden, not gone, and clearing the filter restores every row exactly as it was.

That has a consequence worth keeping in mind. Actions you take on a filtered range apply to the rows you can see: you can copy, edit, format, chart, or print just the visible subset. Find searches only the displayed rows too, so a value sitting in a hidden row will not turn up until you clear the filter. Because the hidden rows are still in the file and untouched by what you do to the visible ones, it is safest to clear filters before you delete a block of rows or fill a column downward, so you are working on the whole range rather than the slice on screen.

Filtering also leaves the row order alone. It hides rows in place instead of moving them, which is the difference from sorting: a filter changes which rows you see, a sort changes the order they sit in. To rearrange rows instead of hiding any, see how to sort data in Excel.

If you would rather pull the matching rows out to a new location than hide the rest in place, the =FILTER() function is the formula version: it returns the rows that meet a condition into a spill range you point it at. The guide to array formulas covers it. And to copy just the distinct values out of a column, Excel’s Advanced Filter has a unique-values option, covered in how to remove duplicates.

The short version

Frequently asked questions

How do I turn on filters in Excel?
Select any cell in your data, then on the Data tab select Filter. That button sits in the ribbon's Sort & Filter group, so the path is Data > Sort & Filter > Filter, and a dropdown arrow then appears on every column header. The same command is also on the Home tab under Editing > Sort & Filter. Data already formatted as an Excel table has filter arrows in its header row from the start.
How do I filter by a specific value?
Select the header arrow for the column you want to narrow, clear the (Select All) check box to uncheck everything, then check only the values you want to see and select OK. In a long list, type into the Search box to find a value fast. Once a filter is on, the arrow changes to a small filter icon.
How do I filter by a text, number, or date condition?
Open the column's header arrow and choose Text Filters, Number Filters, or Date Filters, depending on the column's data type. Pick a comparison such as Contains, Begins With, Greater Than, Between, Top 10, or a date period like This Week, enter any criteria it needs, and select OK.
How do I filter by cell color or font color?
Click a cell that has the color you want, open that column's Filter arrow, and under Filter open the By color menu. Choose Cell Color, Font Color, or Cell Icon, then pick the color to keep on screen. This works whether the color came from manual formatting or from conditional formatting.
How do I clear a filter or show all the rows again?
To clear one column, open its filter icon and select Clear Filter From that column's name. To clear every filter at once and redisplay all rows, on the Data tab select Clear, which leaves the arrows in place. Selecting Filter again on the Data tab turns AutoFilter off and removes the arrows entirely.
Does filtering delete the hidden rows?
No. Filtering hides the rows that do not match and shows only the ones that do; the hidden rows and their data are still in the sheet, and clearing the filter brings them all back. Because the rows are only hidden, actions like copy, edit, and format apply to the visible rows, and Find searches only the displayed data.

Catch the errors before they ship

Reviewing a change to a model? Compare the two versions in your browser and see every changed cell, formula, and value. It's free, and nothing leaves your computer.