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 nowHow 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
Examples
List the overdue invoices
=FILTER(A2:A6,D2:D6="Overdue")INV-2The 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)BoltAny 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,350Other 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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Invoice | Client | Amount | Status | ||
| 2 | INV-1 | Acme | 900 | Paid | ||
| 3 | INV-2 | Bolt | 1400 | Overdue | ||
| 4 | INV-3 | Acme | 650 | Overdue | ||
| 5 | INV-4 | Core | 2200 | Paid | ||
| 6 | INV-5 | Delta | 300 | Overdue | ||
| 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.
Excelio