FormulaCamp
Completed
← All functions
Dynamic arrays

FILTER

Rows that meet a condition.

Syntax

FILTER(array, include, [if_empty])

Example: =FILTER(A2:C100,B2:B100="Kitchen")

Available in: Excel 2021+, Microsoft 365

FILTER returns only the rows (or columns) of a range that meet a condition, and the results spill into the cells below: =FILTER(array, include, [if_empty]). It replaces manual filtering and many INDEX/SMALL array formulas in Microsoft 365 and Excel 2021 or later.

When to use it

Arguments explained

Worked examples

Amounts for one region

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =FILTER(C2:C7,A2:A7="East")

Result: Spills down: 1200, 430, 610

The include test A2:A7="East" is TRUE for three rows, so three amounts spill down from E2.

Names with a large amount

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =FILTER(B2:B7,C2:C7>900)

Result: Spills down: Ana, Dan, Eli

Returns the Rep for every row where Amount exceeds 900.

Friendly message when nothing matches

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =FILTER(A2:A7,C2:C7>5000,"None")

Result: None

The third argument replaces the #CALC! error with your text.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =FILTER(B2:D7,A2:A7="East")

Example spreadsheet for FILTER
ABCDEFGH
1RegionProductUnitsPriceResult
2EastPen1202.5Pen1202.5
3WestPen802.5Book4512
4EastBook4512Lamp1525
5NorthBook6012
6WestLamp3025
7EastLamp1525
Result in F2: Pen
Practice this in a lesson: FILTER

Common errors and how to fix them

Related functions

Frequently asked questions

How do I filter with multiple conditions?
Multiply conditions for AND: (A2:A7="East")*(C2:C7>500). Add them for OR.
Can FILTER return several columns?
Yes. Pass a multi-column array such as A2:C7 and the result spills into all columns.
Does FILTER update automatically?
Yes. It recalculates when the source data changes.
What is the difference between FILTER and the Filter button?
The button hides rows in place. FILTER creates a separate, formula-driven list and leaves the source untouched.

Practice

More in Dynamic arrays