What the filter function does and when to use it

The filter function in Excel lets you hide rows that don't match what you're looking for, so you see only the data you want. If you have a spreadsheet with 500 customer names and you only need to see the ones from California, filtering shows just those rows and hides the rest. The original data stays unchanged — you're just controlling what's visible on screen.

Filtering is different from sorting. Sorting rearranges your rows in a new order. Filtering hides rows without moving anything. You can filter by text (like a state name), by numbers (like sales over $1,000), or by date. Most people use filtering when they're looking at a list and need to focus on a specific subset without deleting anything.

Key Takeaways

  • Select your data range first, then click Data on the menu bar and choose AutoFilter to turn filtering on.
  • Once filtering is on, dropdown arrows appear in the header row — click any arrow to choose which rows to show or hide.
  • You can filter by multiple columns at once, and Excel will show only rows that match all your filters together.
  • To remove a filter from one column, click its dropdown arrow and select "Clear Filter" — your hidden rows come back.
  • Turning off AutoFilter removes all filter dropdowns, but your data stays exactly as it was.

Turning on AutoFilter in three steps

Start by selecting the data you want to filter. Click the first cell in your data (usually the header row) and drag to the last cell that contains information. If your data is large, click the first cell, then hold Shift and click the last cell instead of dragging.

Once your data is selected, go to the Data menu at the top of the screen. Click it, and a dropdown list appears. Look for AutoFilter and click it. Excel will add a small dropdown arrow to the right side of each header cell in your selected range. These arrows are your filter controls.

If you don't see the dropdown arrows, your selection may not have included the header row, or AutoFilter didn't turn on. Try selecting again from the very first cell with a column name, then repeat the Data menu step.

Using a single filter to show only the rows you need

Click any dropdown arrow in the header row. A menu appears with a list of every unique value in that column. For example, if the column contains state names, you'll see Alabama, Alaska, Arizona, and so on. At the top of the menu is a checkbox next to "All" — this controls whether every value is currently shown.

Uncheck the box next to "All" to hide every row. Then check only the values you want to see. If you want to show only California and Texas, uncheck "All," then check California and check Texas. Click OK at the bottom of the menu. Excel now shows only the rows where that column contains California or Texas, and hides everything else.

The dropdown arrow changes color (usually blue) to show that a filter is active on that column. To see all rows again, click the dropdown arrow and check "All," then click OK.

Filtering by multiple columns at once

You can apply filters to more than one column, and Excel shows only rows that match all your filters together. For example, you might filter the State column to show only California, and also filter a Sales column to show only amounts over $5,000. Excel will then display only California rows where the sale was over $5,000.

Set up each filter the same way: click the dropdown arrow, choose which values to show, and click OK. Each column you filter will show a blue dropdown arrow. If you filter three columns, all three arrows turn blue, and the spreadsheet shows only rows that satisfy all three filters at once.

If you want to remove one filter but keep the others, click its dropdown arrow and select "Clear Filter." That column goes back to showing all values, but your other filters stay in place.

Using number and date filters for ranges

For columns with numbers or dates, the filter menu works slightly differently. Click the dropdown arrow, and instead of just a list of values, you'll see options like "Number Filters" or "Date Filters." Click that option to see choices like "Greater Than," "Less Than," "Between," and others.

If you want to show only sales over $10,000, click the dropdown arrow in the Sales column, select "Number Filters," then choose "Greater Than." A dialog box appears where you type 10000. Click OK, and Excel shows only rows where the sales amount is greater than $10,000. For dates, the process is the same — choose "Date Filters," pick the condition you want (like "After" or "Between"), and enter the date or dates.

These range filters are faster than manually checking and unchecking individual values when you're working with hundreds of different numbers or dates.

Removing filters and turning off AutoFilter

To remove a single filter and show all values in that column again, click its dropdown arrow and select "Clear Filter." The arrow stays in place, but that column no longer hides any rows. Your other filters continue to work.

To remove all filters at once and show every row, go to the Data menu and click AutoFilter again. This turns off AutoFilter entirely, and all the dropdown arrows disappear. Your data returns to normal view with every row visible. Nothing is deleted — you're just removing the filter controls.

If you turn AutoFilter back on later, you'll start with a clean slate. Any filters you had set up before are gone, and you'll need to set them up again if you want them.

Common mistakes and how to fix them

The most common mistake is selecting data that doesn't include the header row. If you start your selection in row 2 instead of row 1, Excel treats row 1 as data rather than headers, and the filter arrows appear in the wrong place. Always start your selection at the very first cell with a column name.

Another mistake is forgetting that a filter is already active. You might think data is missing when it's actually just hidden by a filter you set up earlier. Look at the dropdown arrows — if any are blue, a filter is on. Click it to see what's being hidden.

If you copy filtered data, Excel copies only the visible rows, not the hidden ones. This is usually what you want, but if you need all the data, turn off the filter first, then copy.

Frequently Asked Questions

Can I filter by more than one value in the same column?

Yes. Click the dropdown arrow, uncheck "All," then check every value you want to see. If you want to show California, Texas, and Florida, check those three and uncheck the rest. Click OK, and Excel shows only rows matching any of those three states.

What's the difference between filtering and sorting?

Filtering hides rows without moving them — your original row order stays the same underneath. Sorting rearranges rows into a new order. You can use both together: filter to show only certain rows, then sort those visible rows alphabetically or by number.

If I filter data and then save the file, will the filter stay on when I open it again?

Yes. Excel saves your filter settings with the file. When you reopen it, the same rows will be hidden. If you want to remove the filter before saving, turn off AutoFilter first, then save.

Can I filter by color or cell formatting?

Yes, but only in newer versions of Excel. Click the dropdown arrow and look for "Filter by Color" or similar option. This lets you show only cells with a specific background color or text color. Older versions of Excel don't have this feature.

What happens to formulas in other cells when I filter data?

Formulas that reference filtered data will only calculate using the visible rows, not the hidden ones. If you have a SUM formula and you filter the data, the sum changes to include only visible cells. This is usually what you want, but be aware that the formula result changes when you filter.