FILTER Function

Excel Functions › Lookup & Reference

Excel 365 Excel 2021+ Dynamic Array

The Excel FILTER function returns all rows of a range that meet your criteria — one formula, many results. The output spills onto the worksheet and updates automatically when the data changes, replacing copy-paste filtering and array gymnastics with a single readable formula.


Quick answer: to pull every row where the Region column equals "West":
=FILTER(A2:C9, B2:B9="West", "No results")
The third argument is what to show when nothing matches — without it, an empty result returns the #CALC! error.

Syntax

=FILTER(array, include, [if_empty])
ArgumentDescription
arrayRequiredThe range or array to filter (the rows you want back).
includeRequiredA TRUE/FALSE test with the same number of rows as array — e.g. B2:B9="West".
if_emptyOptionalWhat to return when no rows match. Omit it and an empty result shows #CALC!.

Available in: Excel for Microsoft 365, Excel 2021+, and Excel for the web. Older versions show #NAME?.

Filter by one criterion

The orders table below sits in A2:C9. One formula pulls every "West" order (highlighted rows):

ABC
1CustomerRegionAmount
2Acme CorpWest$1,850
3Bolt LLCEast$920
4Cedar IncWest$2,400
5Delta CoNorth$1,310
6Echo LtdWest$480
7FoxtrotEast$3,175
8Gamma LLCNorth$760
9Helix CoWest$1,490
=FILTER(A2:C9, B2:B9="West", "No results") // returns 4 complete rows, spilled

The result lands in the cell holding the formula and spills right and down. Refer to the whole spilled result elsewhere with the spill operator: if the formula is in E2, use E2#.

Try it: interactive FILTER demo

Live demo

Filter the orders table live. Combine a region with a minimum amount and watch the formula grow AND logic.

Multiple criteria: AND uses *, OR uses +

The include argument is just arithmetic on TRUE/FALSE arrays. Multiply tests for AND, add them for OR:

=FILTER(A2:C9, (B2:B9="West")*(C2:C9>1000), "None") // West AND over $1,000
=FILTER(A2:C9, (B2:B9="North")+(B2:B9="East"), "None") // North OR East

Each test sits in its own parentheses. You can chain as many as you need.

Sort, count, and shape the results

FILTER nests beautifully with other dynamic array functions:

=SORT(FILTER(A2:C9, B2:B9="West"), 3, -1) // West orders, largest amount first
=ROWS(FILTER(A2:C9, C2:C9>1000)) // how many orders over $1,000?
=CHOOSECOLS(FILTER(A2:C9, B2:B9="West"), 1, 3) // just Customer and Amount columns (365)

Errors & common pitfalls

#CALC! — empty result. No rows matched and you didn't supply if_empty. Add a third argument like "No results" or "".

#SPILL! — no room to spill. Something occupies the cells the result needs. Clear the spill range below and to the right of the formula.

#VALUE! — mismatched sizes. The include test must cover exactly as many rows as array. =FILTER(A2:C9, B2:B8="West") fails — 8 rows filtered by a 7-row test.

Pitfall: don't type inside the spill area. Manually entering data where results will land causes #SPILL!. Keep the landing zone clear — results grow and shrink as data changes.

Pitfall: sharing files with older Excel. Excel 2019 and older don't have FILTER — recipients see #NAME?. For maximum compatibility you'd need helper columns or PivotTables instead.

Practice workbook

📊
Download the free FILTER practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Which Excel versions have the FILTER function?
Excel for Microsoft 365, Excel 2021 and later, and Excel for the web. Excel 2019 and older show #NAME?.
How do I FILTER with multiple criteria?
Multiply the tests for AND logic: (B2:B9="West")*(C2:C9>1000). Add them for OR logic: (B2:B9="North")+(B2:B9="East").
What's the difference between FILTER and AutoFilter?
AutoFilter hides rows in place; FILTER writes matching rows to a new location with a live formula. FILTER results update automatically and can feed other formulas.
Can FILTER return only certain columns?
Yes. Wrap it in CHOOSECOLS (Excel 365): =CHOOSECOLS(FILTER(...), 1, 3). Alternatively, filter a narrower array in the first argument.
How do I sort FILTER results?
Nest it in SORT: =SORT(FILTER(A2:C9, B2:B9="West"), 3, -1) sorts the matches by the 3rd column, descending.
Why does my FILTER return #SPILL!?
The result needs empty cells to land in, and something is in the way. Clear the cells below/right of the formula, or move the formula somewhere with room.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: SORT · UNIQUE · XLOOKUP · CHOOSECOLS