
π This article includes 1 downloadable practice file β
In this article
FILTER returns all rows (or columns) that meet a condition, and the result updates live as data changes.
Syntax
=FILTER(array, include, [if_empty])
| Argument | What it means |
|---|---|
array |
The data to filter. |
include |
TRUE/FALSE test with the same height, e.g. B2:B500=”North”. |
if_empty |
What to show when nothing matches. |
Examples
Example 1
=FILTER(A2:E500, B2:B500="North", "None")
All North rows.
Example 2
=FILTER(A2:E500, (B2:B500="North")*(E2:E500>50000))
AND: multiply conditions.
Example 3
=FILTER(A2:E500, (B2:B500="North")+(B2:B500="East"))
OR: add conditions.
Power combo
=SORT(FILTER(A2:E500, E2:E500>50000), 5, -1)
Live βbig dealsβ report sorted by amount.
Common errors and fixes
| You see | Why, and the fix |
|---|---|
#SPILL! |
Something is in the way of the results β clear the cells below/right. |
#CALC! |
Nothing matched and if_empty is missing. |
FILTER in practice
Where you will use it
- All orders of one customer
- Overdue invoices only
- Live lists that update as data changes
Worked example
Customers in the region, joined into one cell.
| Region | Formula | Result |
|---|---|---|
| North | =IFERROR(TEXTJOIN(", ",,FILTER({"Patel";"Shah";"Mehta";"Iyer"},{"North";"South";"North";"South"}=A2)),"none") | Patel, Mehta |
| South | =IFERROR(TEXTJOIN(", ",,FILTER({"Patel";"Shah";"Mehta";"Iyer"},{"North";"South";"North";"South"}=A3)),"none") | Shah, Iyer |
| East | =IFERROR(TEXTJOIN(", ",,FILTER({"Patel";"Shah";"Mehta";"Iyer"},{"North";"South";"North";"South"}=A4)),"none") | none |
Results calculated in Excel.
Mistakes people make
| Mistake | What to do instead |
|---|---|
| No matches | #CALC!; use the if_empty argument |
| Spill blocked | Clear cells below the formula |
Related functions
SORT Β· UNIQUE Β· XLOOKUP Β· TEXTJOIN
π Part of the free Excel course: Beginner β Expert Β· Try it in the Formula Lab or ask the AI Helper.
Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.
π Practice files for this article
- πPractice workbook: Dynamic arrays18 tasks on realistic sales data β type your formula, the Check column turns green when it is right. Answers sheet included.β¬ XLSX Β· 35 KB
Free to use for learning. Files with macros (.bas) are plain text β import them with Alt+F11 β File β Import File, and always test on a copy.
Atul (AJ) builds office-automation and local-first AI tools as Atulya AI, and works with Excel, SAP and Oracle EPM every day. He writes about the shortcuts, macros and automations that actually save time β plus the occasional wacky fact. Videos on YouTube: Lazy Automator AI (@LazyAutomatorAI).
More posts by Atul βBuild this skill next
This page is a quick function reference. Use it for syntax, then practise the function in a broader workflow.
Stuck on a step? Ask a question and the AI answers using this article.