Function · Dynamic arrays

Excel FILTER function

The Excel FILTER function spills the rows that pass a test. Household amounts over $100 come back as rent and tuition.

Microsoft 365, Excel 2021, Excel 2024, and Excel for the web. Google Sheets has FILTER. Excel 2019 and earlier do not.

Syntax =FILTER(array, include, [if_empty])

FILTER
=FILTER(A2:B6,B2:B6>100,"None")

Arguments

NameRequiredWhat to pass
arrayRequiredThe rows to return, including every column you want to see.
includeRequiredA TRUE or FALSE for each row, the same height as array. Usually a test such as B2:B6>100.
if_emptyOptionalWhat to return when no row passes. If omitted, an empty result is the #CALC! error.

Examples

Amounts over $100

=FILTER(A2:B6,B2:B6>100,"None")

Result Two rows: Rent $1,900 and Tuition $800

=FILTER(A2:B6,B2:B6>100,"None")B7
Bills
AB
1ItemAmount
2Rent1900
3Groceries86.40
4Tuition800
5Pharmacy30
6Dinner42
7Over $100Rent 1900; Tuition 800
A picture of the sheet, not a live calculator. The formula spills two rows, Rent $1,900 and Tuition $800. The cell shows that result as a label.

FILTER returns the rows that pass a test and spills them, starting in the cell that holds the formula. Rent at $1,900 and tuition at $800 are the rows over $100. Groceries, the pharmacy, and dinner stay in the source list and do not appear in the spill. The spill is still one formula. Delete the formula and every result row goes with it.

If nothing matches and you left out if_empty, the result is #CALC!, not a blank. Pass "None" or "" so a quiet month does not look like a broken sheet. Excel 2019 and earlier do not have FILTER. SUMIFS still totals those rows there. It just cannot list them. The workbook needs empty cells below and to the right, or the spill stops with #SPILL!.