Excel FILTER

FILTER returns every row that meets a condition and spills the results into the cells below, updating by itself.

A bookkeeper chases overdue invoices. The filter button hides rows, but the result cannot feed a report without copying and pasting. FILTER creates a separate live list, so when an invoice is marked Paid it disappears from the chase list immediately.

Practice it now

How to write it

=FILTER(array, include, [if_empty])
array
The data to return.
include
A test producing TRUE or FALSE for each row.
if_empty
Optional text to show when nothing matches.

Watch it work

F2fx 
ABCDEFG
1InvoiceClientAmountStatus
2INV-1Acme900Paid
3INV-2Bolt1400Overdue
4INV-3Acme650Overdue
5INV-4Core2200Paid
6INV-5Delta300Overdue
7
1

The first match appears in the formula cell and INV-3 and INV-5 spill below it.

Examples

List the overdue invoices

=FILTER(A2:A6,D2:D6="Overdue")INV-2

The first match appears in the formula cell and INV-3 and INV-5 spill below it.

Clients with an invoice over 1,000

=FILTER(B2:B6,C2:C6>1000)Bolt

Any comparison that produces TRUE or FALSE per row works as the test.

Total owed on overdue invoices

=SUM(FILTER(C2:C6,D2:D6="Overdue"))2,350

Other functions can work on the filtered result directly.

Your turn

Use FILTER inside SUM to total every invoice for Acme. Type your formula in F2.

ABCDEF
1InvoiceClientAmountStatus
2INV-1Acme900Paid
3INV-2Bolt1400Overdue
4INV-3Acme650Overdue
5INV-4Core2200Paid
6INV-5Delta300Overdue
7

Common mistakes

#SPILL! error.

Something is in the way below the formula. Clear those cells.

#CALC! error.

Nothing matched. Add the third argument, such as "None".

Good to know

  • Multiply tests for AND: (B2:B6="Acme")*(C2:C6>700).
  • Add tests with + for OR.
  • Wrap FILTER in SORT to order the results.
  • FILTER or the Filter button? The button changes what you see in place. The function creates a second, live result other formulas can use.