Cellwise Start free

Excel guide · 5 min read

FILTER function vs Advanced Filter in Excel

Quick answerThe FILTER function is a formula: it spills the matching rows into cells and updates by itself when the data changes, in Excel for Microsoft 365, Excel 2021 or later. Advanced Filter (Data > Advanced) is a one-off command that works in every version: it hides non-matching rows or copies matches somewhere else, and you rerun it after changes. Use FILTER for a report that must stay current; use Advanced Filter for older Excel, OR criteria across columns without formulas, or a quick list of unique records.

Sample data

Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.

ABCDE
1OrderRegionRepProductAmount
2PO-2201EastMayaDesk chair1480
3PO-2202WestOmarMonitor arm320
4PO-2203EastLiamStanding desk2150
5PO-2204NorthMayaDesk chair740
6PO-2205WestOmarStanding desk1960
7PO-2206EastgatePriyaFootrest95
8PO-2207NorthLiamMonitor arm410
9PO-2208EastPriyaDesk chair880

Download this sheet as an Excel practice file (.xlsx)

Three ways to filter, side by side

AutoFilter is the drop-down arrows you get with Data > Filter or Ctrl+Shift+L. It hides rows in place, and conditions in different columns combine with AND. It's the fastest way to have a look, but it changes what everyone sees on the sheet.

Advanced Filter uses a small criteria range that you type on the sheet, so it can combine AND and OR in ways AutoFilter can't, and it can copy the result elsewhere. The FILTER function does the same job with a formula, and the result is live. All three work on this order list, and each suits a different job.

The FILTER function: live results

FILTER(array, include, [if_empty]) returns every row where include is TRUE. Multiply tests for AND, add them for OR. Here the question is "East orders, or any order over 1,500", which is an OR across two different columns.

Add a new East order to the data and the result grows by itself. The result can sit on another sheet, feed other formulas like SUM or SORT, and the criteria can come from cells someone types into.

=FILTER(A2:A9,(B2:B9="East")+(E2:E9>1500))

Result: spills 4 rows × 1 column

PO-2201
PO-2203
PO-2205
PO-2208

PO-2201, PO-2203, PO-2205 and PO-2208: the three East orders plus PO-2205, a West order over 1,500. PO-2206 for Eastgate is left out because "East" must match exactly.

Advanced Filter: a criteria range and a one-off result

Put a copy of the headers you need above or beside the data, with at least one blank row between them and the list. Under them, type the conditions. Conditions on the same row are AND; conditions on separate rows are OR. For the same question as above, type Region and Amount as headers in G1:H1, ="=East" in G2 (the odd form is explained below), and >1500 in H3.

Copy to another location only copies to the sheet you're on. To send results to another sheet, click on that sheet first, then start Data > Advanced and point the list range back at the data.

  1. Click a cell inside the data.
  2. Go to Data > Advanced (in the Sort & Filter group).
  3. Check the List range covers the data with its headers, and set the Criteria range to the criteria headers and rows, here G1:H3.
  4. Choose Filter the list, in-place to hide non-matching rows, or Copy to another location and pick a single cell for the top-left of the output.
  5. Click OK. To clear an in-place filter, use Data > Clear.

The Advanced Filter gotcha: text matches "begins with"

In a criteria range, typing East matches every value that starts with East, so Eastgate's order PO-2206 is included too. For an exact match, type the criterion as ="=East" in the cell; it shows =East and matches only East. FILTER doesn't have this trap: B2:B9="East" is exact, and you'd use LEFT or SEARCH if you wanted begins-with or contains.

Two more traps. A completely blank row inside the criteria range means "no condition" and lets every row through. And criteria headers must match the data headers exactly, or nothing matches.

=ROWS(FILTER(A2:A9,LEFT(B2:B9,4)="East"))

Result: 4

4: four orders have a region starting with East, including the Eastgate one. That's the set an Advanced Filter criterion of plain East returns.

Unique records: the other reason people use Advanced Filter

Tick Unique records only in the Advanced Filter box and Excel keeps the first of each identical row. With Copy to another location and a single column, that's a quick distinct list in any version of Excel, and it leaves the original alone.

In Excel 365 and 2021, UNIQUE does the same with a formula and stays up to date. Wrap it in SORT for an A to Z list.

=SORT(UNIQUE(B2:B9))

Result: spills 4 rows × 1 column

East
Eastgate
North
West

East, Eastgate, North and West: each region once, sorted, spilling down four cells.

Which one to pick

Pick the FILTER function when the result is a report people will open again: a list per customer, overdue items, anything driven by a drop-down. It updates by itself and never hides rows from colleagues. It needs empty cells to spill into and can't go inside an Excel table.

Pick Advanced Filter when you're on Excel 2019 or earlier, when you need a one-off extract to send someone, or a quick unique list without formulas. Pick AutoFilter for a quick look at your own data, and remember to clear it before you share the file. To total only the rows an AutoFilter or in-place Advanced Filter leaves visible, use SUBTOTAL(109, range).

Common mistakes

Typing East in an Advanced Filter criteria cell and getting Eastgate too

Use ="=East" for an exact match. Plain text matches anything that begins with it.

Expecting an Advanced Filter result to update when the data changes

It's a snapshot. Rerun it, or use the FILTER function in Excel 365 or 2021.

Leaving a blank row in the criteria range

A blank criteria row matches everything. Set the criteria range to cover only filled rows.

Trying to copy Advanced Filter results to another sheet from the data sheet

Start Data > Advanced from the destination sheet and point the list range back at the data.

FAQ

What is the difference between Filter and Advanced Filter in Excel?

AutoFilter hides rows using drop-down arrows, with AND between columns. Advanced Filter uses a criteria range for AND and OR combinations, and can copy matches to another place or keep unique records only.

Does Advanced Filter update automatically?

No. It runs once. Rerun it after the data changes, or use the FILTER function, which recalculates by itself.

Is the FILTER function available in Excel 2016 or 2019?

No. FILTER needs Excel for Microsoft 365, Excel 2021 or later, or Excel for the web. In older versions use AutoFilter or Advanced Filter.

How do I do an OR filter across two columns?

With FILTER, add the tests: (B2:B9="East")+(E2:E9>1500). With Advanced Filter, put each condition on its own row of the criteria range.

Functions used

Related guides

Updated