Excel's AutoFilter shows and hides rows based on the values you choose

AutoFilter is the fastest way to filter data in Excel. It adds dropdown arrows to your column headers, and you click the arrow to pick which values appear. If you have a spreadsheet of sales records, you can filter to show only orders from January, or only rows where the amount is over $500. The rows you hide are still there — they just do not display until you remove the filter.

To turn on AutoFilter, click any cell in your data table, then go to the Data tab at the top and click AutoFilter. Excel adds a small dropdown arrow to the right of each column header. Click the arrow in any column to see your filter options.

AutoFilter works on the data range Excel recognizes as your table. If your data starts in row 1 with headers and continues down, Excel usually detects it automatically. If your table has gaps or unusual formatting, click a cell in the table first, then turn on AutoFilter — Excel will highlight the range it is filtering.

Key Takeaways

  • AutoFilter adds dropdown arrows to column headers and lets you show or hide rows by selecting the values you want to see.
  • You can filter by unchecking values you do not want, or by setting conditions like "greater than 100" or "contains text".
  • Multiple filters work together — if you filter two columns, Excel shows only rows that match both conditions.
  • Filtering hides rows but does not delete them; removing the filter brings them back.
  • Advanced Filter lets you set complex conditions and copy filtered results to a new location.

Filtering by selecting or deselecting values

When you click a column's dropdown arrow, you see a list of every unique value in that column, each with a checkbox. By default, all values are checked. Uncheck the values you want to hide, then click OK. Excel shows only the rows where that column contains a checked value.

If your column has many values, use the search box at the top of the filter menu to find specific ones quickly. Type part of the value — for example, type "New" to find "New York" and "New Jersey" — and the list narrows to matches. Check or uncheck the results, then click OK.

To remove a filter from one column, click its dropdown arrow and click Clear Filter. To remove all filters at once, go to the Data tab and click AutoFilter again — this turns off filtering entirely and removes the dropdown arrows.

Using conditions to filter numbers and dates

For columns with numbers or dates, you can set conditions instead of picking individual values. Click the column's dropdown arrow and select Number Filters (for numbers) or Date Filters (for dates). A submenu appears with options like "Greater Than", "Less Than", "Between", and "Equals".

Choose the condition you need. A dialog box opens where you enter the value to compare against. For example, select "Greater Than" and type 5000 to show only rows where that column is above 5000. For "Between", you enter a start and end value. Click OK and Excel displays only matching rows.

You can also filter text columns by condition. Click the dropdown arrow and select Text Filters to find options like "Contains", "Begins With", and "Ends With". These are useful when you want to show all rows where a name contains a certain word, or all product codes that start with a specific letter.

Combining filters on multiple columns

When you filter one column, then filter another, Excel shows only rows that match both conditions. For example, filter the Region column to show only "West", then filter the Product column to show only "Widget". Excel displays only rows where the region is West AND the product is Widget.

You can filter as many columns as you need. Each new filter narrows the results further. The dropdown arrows on filtered columns turn blue to remind you a filter is active on that column. If you filter too many columns and see no results, one of your conditions may be too strict — check each filter to see which one is eliminating all rows.

To change a filter without removing others, click the dropdown arrow on that column and adjust the values or condition. The other filters stay in place. To remove just one filter, click its dropdown arrow and select Clear Filter.

Using Advanced Filter for complex conditions

Advanced Filter lets you set up conditions that AutoFilter cannot handle alone. For example, you might want to show rows where (Region is "East" OR Region is "West") AND (Amount is greater than 1000). AutoFilter combines conditions with AND only, so Advanced Filter is necessary for OR logic.

To use Advanced Filter, first set up a criteria range — a small table elsewhere on your sheet that lists the conditions you want. The criteria table has column headers that match your data, and below each header you write the condition. For example, if your data has columns Region, Product, and Amount, your criteria table would have those same headers, and you would write "East" under Region and ">1000" under Amount.

Once your criteria table is ready, click a cell in your data, go to the Data tab, and click Advanced. A dialog opens. Under "List range", Excel shows your data range. Under "Criteria range", enter the cells containing your criteria table. You can choose to filter in place (hide rows like AutoFilter does) or copy results to another location. Click OK and Excel applies the filter.

Copying filtered results to a new location

When you filter data, you see only the rows that match, but the hidden rows are still part of the original table. If you want to work with just the filtered results separately, you can copy them to a new location. First, filter your data to show only what you need. Then select all visible cells — click the top-left corner of your data range to select everything, or click and drag to select specific columns.

Copy the selection with Ctrl+C (or Cmd+C on Mac). Click a cell in a new area of your sheet or in a new sheet, then paste with Ctrl+V. Excel copies only the visible (filtered) rows, not the hidden ones. The pasted data is independent — changes to the original filtered table do not affect the copy.

Alternatively, use Advanced Filter and check the box labeled "Copy to another location". This does the filtering and copying in one step. Enter the criteria range, then specify where you want the results to go. Excel copies the filtered rows to that location automatically.

Sorting filtered data and removing filters

You can sort filtered data just like unfiltered data. Click a column header in your filtered results and use the Data tab to sort A to Z, Z to A, smallest to largest, or largest to smallest. The sort applies only to visible rows — hidden rows stay hidden and do not move.

When you remove a filter, the sort you applied to the filtered data remains. For example, if you filter to show only January sales and sort by amount, then remove the filter, all rows reappear but stay sorted by amount. If you want to return to the original order, you need to sort by the row number or the column you originally sorted by.

To turn off all filters and see your entire table again, go to the Data tab and click AutoFilter to toggle it off. The dropdown arrows disappear and all hidden rows reappear. Your data is unchanged — filtering only hides rows, it does not modify or delete anything.

Frequently Asked Questions

Can I filter by color or cell formatting?

Yes. Click the column's dropdown arrow and select Filter by Color. You see a list of colors used in that column. Check the colors you want to show and uncheck the rest. This works for cell background color, font color, and cell icons if your data uses conditional formatting.

What happens to formulas when I filter data?

Formulas that reference filtered cells still calculate, but they include hidden rows in the calculation. If you want a sum or count of only visible cells, use SUBTOTAL instead of SUM. SUBTOTAL ignores hidden rows by default, so your result reflects only what you see on screen.

Can I save a filter so it opens the next time I open the file?

Yes. Set up your filter the way you want it, then save the file. When you open the file again, the filter is still active and shows the same filtered view. The filter settings are saved with the file, not with Excel itself.

How do I filter for blank cells or cells with errors?

Click the column's dropdown arrow. At the bottom of the value list, you see options like "(Blanks)" and "(Errors)". Check or uncheck these just like any other value. Checking "(Blanks)" shows only rows where that column is empty.

What is the difference between filtering and sorting?

Filtering hides rows that do not match your criteria; sorting rearranges all rows in a specific order. You can filter and sort together — filter to show certain rows, then sort those rows by a column. Both operations are temporary and do not change your original data.