FILTER Function in Google Sheets — Complete Guide
FILTER is Google Sheets' most useful dynamic-array function. One formula returns every row matching your criteria — as source data changes, the result updates automatically. No dragging formulas down, no rebuilding when data grows. This guide covers FILTER from syntax to production dashboards: single criteria, multi-criteria AND/OR patterns, common errors, when FILTER beats QUERY, and the 15 patterns you'll actually use.
⚡ Quick Answer
FILTER returns rows from a range where conditions are TRUE: =FILTER(range, condition1, [condition2, ...]). Multiple conditions treated as AND when passed as separate arguments. For explicit AND/OR logic use multiplication (*) and addition (+) inside a single condition. Results are dynamic — they update as source data changes. Wrap in IFERROR to handle no-match cases. Wrap in SORT to order the results.
📋 What's in this guide
- What FILTER does
- Syntax
- Basic single-criterion filter
- Multi-criteria: AND and OR
- Text filtering patterns
- Date range filtering
- Numeric comparison filters
- Dynamic dashboards with FILTER
- Sorting filtered results
- Nesting FILTER with other functions
- Common errors and fixes
- FILTER vs QUERY vs AutoFilter
- FILTER in Excel
- 15 patterns you'll actually use
- FAQ
What FILTER does
FILTER takes a range and one or more conditions. It returns every row where the conditions evaluate TRUE. Because it's a dynamic array function, the output spills — one formula produces however many rows match, and Sheets renders them in the cells below.
The result is live: add a row to the source that matches the criteria, and the FILTER output grows to include it. Change a value so a row no longer matches, and the output shrinks. This is what makes FILTER the workhorse for dashboards, live reports, and any workflow where source data updates continuously.
Syntax
- range — the source data to filter (single or multi-column)
- condition1 — a boolean array with the same number of rows as the range. Each element determines whether the corresponding source row is included
- condition2, condition3, ... — additional conditions. All must be TRUE for a row to be included (implicit AND when passed as separate arguments)
Each condition must be a boolean array with exactly the same number of rows as the source range. If your source is A2:C1000 (999 rows), each condition must produce 999 booleans. Mismatched dimensions cause #N/A or #VALUE!. This is the single most common FILTER error.
Basic single-criterion filter
The simplest FILTER: pull rows where one column matches a value.
=FILTER(A2:D1000, B2:B1000="North")
=FILTER(D2:D1000, B2:B1000="North")
Multi-criteria: AND and OR
Multiple criteria are where FILTER gets powerful — and where syntax matters.
AND (all conditions must be true)
Two ways to express AND: pass conditions as separate arguments (implicit AND), or multiply them inside a single argument (explicit AND).
=FILTER(A2:D1000, B2:B1000="North", D2:D1000>1000)
=FILTER(A2:D1000, (B2:B1000="North") * (D2:D1000>1000))
OR (any condition can be true)
OR requires the multiplication/addition syntax — there's no "OR argument" in FILTER.
=FILTER(A2:D1000, (B2:B1000="North") + (B2:B1000="South"))
Mixed AND/OR
=FILTER(A2:D1000,
((B2:B1000="North") + (B2:B1000="South")) * (D2:D1000>1000))
Mixed AND/OR is a common source of subtle bugs. Group your OR clauses in parentheses before multiplying with AND clauses. When in doubt, break the condition into helper columns first, verify each returns TRUE/FALSE correctly, then compose them into the FILTER.
Text filtering patterns
Exact match
=FILTER(A2:D1000, B2:B1000="north")
Case-sensitive match
=FILTER(A2:D1000, EXACT(B2:B1000, "North"))
Partial match (contains)
=FILTER(A2:D1000, REGEXMATCH(C2:C1000, "(?i)manager"))
(?i) flag makes it case-insensitive. Best for partial-string matching.Multiple text options
=FILTER(A2:D1000,
REGEXMATCH(B2:B1000, "^(North|South|East|West)$"))
Date range filtering
=FILTER(A2:D1000,
A2:A1000>=DATE(2026,7,1),
A2:A1000<=DATE(2026,9,30))
=FILTER(A2:D1000, A2:A1000>=TODAY()-30)
=FILTER(A2:D1000,
MONTH(A2:A1000)=3,
YEAR(A2:A1000)=2026)
Numeric comparison filters
=FILTER(A2:D1000,
D2:D1000>=1000,
D2:D1000<=10000)
=FILTER(A2:D1000, D2:D1000>=PERCENTILE(D2:D1000, 0.9))
=FILTER(A2:D1000, D2:D1000>MEDIAN(D2:D1000))
Dynamic dashboards with FILTER
FILTER's real power shows up in dashboards where the filter criteria live in a cell — change the cell, the dashboard updates instantly.
=FILTER(A2:D1000, B2:B1000=$G$1)
=FILTER(A2:D1000,
IF($G$1="All", TRUE, B2:B1000=$G$1),
IF($G$2="All", TRUE, C2:C1000=$G$2))
Instead of $G$1 and $G$2, define named ranges: SelectedRegion, SelectedRep. Formulas become =FILTER(A2:D1000, B2:B1000=SelectedRegion) — self-documenting and easier to maintain. Data → Named ranges.
Sorting filtered results
FILTER preserves source order. To sort the output, wrap in SORT.
=SORT(FILTER(A2:D1000, B2:B1000="North"), 4, FALSE)
=SORT(FILTER(A2:D1000, B2:B1000="North"),
2, TRUE, 4, FALSE)
Nesting FILTER with other functions
FILTER + SUM
=SUM(FILTER(D2:D1000, B2:B1000="North"))
SUMIF(B2:B1000, "North", D2:D1000) but composes with more complex filter conditions.FILTER + COUNTA
=COUNTA(FILTER(A2:A1000, B2:B1000="North"))
=IFERROR(COUNTA(FILTER(...)), 0).FILTER + UNIQUE
=UNIQUE(FILTER(C2:C1000, B2:B1000="North"))
FILTER + ARRAYFORMULA
=ARRAYFORMULA(FILTER(D2:D1000, B2:B1000="North") * 1.08)
Common errors and fixes
| Error | Cause | Fix |
|---|---|---|
#N/A |
No rows match the criteria | Wrap in IFERROR(FILTER(...), "No results") |
#REF! |
Output would overwrite existing data | Clear the range below the formula |
#VALUE! |
Condition array size doesn't match source | Ensure conditions cover the same rows as the source range |
| Includes headers | Range starts at row 1 | Start at row 2: A2:D1000 not A:D |
| Missing recent rows | Range has fixed upper bound | Use open-ended range: A2:D instead of A2:D1000 |
| Slow performance | Open-ended range on huge dataset | Set explicit upper bound sized to your data |
FILTER vs QUERY vs AutoFilter
AutoFilter (Data → Create a filter)
Type: Interactive UI.
Best for: Ad-hoc exploration by end users.
Limits: Not formula-based; can't feed other formulas; changes are visible to everyone; doesn't compose.
FILTER (formula)
Type: Dynamic array formula.
Best for: Dashboards, live reports, feeding other formulas.
Strengths: Composes with SORT, UNIQUE, SUM; updates automatically; each user sees the same live output.
Use FILTER when you need rows matching a condition. Use QUERY when you need to reshape, aggregate, or pivot (SELECT specific columns, GROUP BY, SUM, ORDER, LIMIT, PIVOT). FILTER is faster to write for row-selection; QUERY does everything FILTER does plus more. Many dashboards use both — FILTER first for narrowing, QUERY for the aggregation.
FILTER in Excel
Excel has FILTER too — introduced with dynamic arrays in Excel 2021 and Microsoft 365. Syntax is nearly identical to Sheets FILTER, with two differences:
- Excel FILTER has a third argument for the "if empty" case:
=FILTER(range, condition, "No results"). Sheets requires wrapping in IFERROR. - Excel's condition array must exactly match the source rows (Sheets is slightly more forgiving with edge cases).
For a full Excel-side comparison, see our FILTER vs AutoFilter post and the Dynamic Arrays complete guide.
15 patterns you'll actually use
| Goal | Formula |
|---|---|
| Filter by exact match | =FILTER(A2:D, B2:B="North") |
| Filter with AND | =FILTER(A2:D, B2:B="North", D2:D>1000) |
| Filter with OR | =FILTER(A2:D, (B2:B="North")+(B2:B="South")) |
| Filter with contains | =FILTER(A2:D, REGEXMATCH(C2:C, "manager")) |
| Filter last 30 days | =FILTER(A2:D, A2:A>=TODAY()-30) |
| Filter by dropdown | =FILTER(A2:D, B2:B=$G$1) |
| Filter with "All" option | =FILTER(A2:D, IF($G$1="All", TRUE, B2:B=$G$1)) |
| Filter and sort | =SORT(FILTER(A2:D, B2:B="North"), 4, FALSE) |
| Filter and dedupe | =UNIQUE(FILTER(C2:C, B2:B="North")) |
| Filter and sum | =SUM(FILTER(D2:D, B2:B="North")) |
| Filter and count | =COUNTA(FILTER(A2:A, B2:B="North")) |
| Filter top decile | =FILTER(A2:D, D2:D>=PERCENTILE(D2:D, 0.9)) |
| Filter empty rows | =FILTER(A2:D, D2:D="") |
| Filter non-empty rows | =FILTER(A2:D, D2:D<>"") |
| Filter with fallback | =IFERROR(FILTER(A2:D, B2:B="North"), "No results") |
Sheets Wizard — describe your filter, get the formula
"Filter to North region, amounts over $1000, in the last 30 days" — Sheets Wizard writes the FILTER with proper conditions, date syntax, and IFERROR wrapping. Also handles the tricky mixed AND/OR cases where parentheses matter.
Also modernizes legacy patterns — converts inherited SUMIF/COUNTIF chains into cleaner FILTER + SUM/COUNTA compositions.
Install Sheets Wizard →Frequently asked questions
What does FILTER do in Google Sheets?
FILTER returns rows from a range where one or more conditions are met. It's a dynamic array function — one formula produces multiple rows of output that spill down the sheet. Unlike the AutoFilter UI (Data → Create a filter), FILTER is formula-based, updates automatically as source data changes, and can feed other formulas or charts. It's Google Sheets' answer to writing a mini-query without needing SQL.
How do I use FILTER with multiple criteria?
Multiply conditions for AND logic and add them for OR logic. AND example: =FILTER(A2:C1000, (B2:B1000="North") * (C2:C1000>1000)) returns rows where region is North AND amount exceeds 1000. OR example: =FILTER(A2:C1000, (B2:B1000="North") + (B2:B1000="South")) returns rows where region is either North or South. The multiplication and addition operate on boolean arrays, treating TRUE as 1 and FALSE as 0.
What's the difference between FILTER and QUERY in Sheets?
FILTER returns rows matching conditions — it's a subset. QUERY is more powerful: it can SELECT specific columns, GROUP BY, aggregate (SUM, COUNT), ORDER, LIMIT, and PIVOT. If you just need rows where a condition matches, use FILTER — it's simpler and faster to write. If you need to reshape, aggregate, or pivot, use QUERY. Many workflows combine both: FILTER for narrowing rows, then feed into a QUERY for aggregation.
Why is FILTER returning #N/A?
FILTER returns #N/A when no rows match the criteria. Wrap in IFERROR to provide a fallback: =IFERROR(FILTER(A2:C1000, B2:B1000="North"), "No results"). #N/A is a feature, not a bug — it lets you distinguish between an empty result and a broken formula. Other common errors: #REF! means the output would overwrite existing data (clear the range below); #VALUE! usually means condition ranges don't match the source range dimensions.
Does FILTER work in Excel?
Yes, but only in Excel 2021 and Microsoft 365. Older versions (Excel 2019 and earlier) don't have FILTER — use array formulas with IF, or use AutoFilter for interactive filtering. Excel's FILTER has slightly different syntax for multiple criteria (it uses the same multiplication trick but with more Excel-specific gotchas around the include argument shape). Google Sheets FILTER has existed since day one and is more forgiving syntactically.
Can FILTER sort results?
Not directly — FILTER preserves source order. To sort filtered results, wrap in SORT: =SORT(FILTER(A2:C1000, B2:B1000="North"), 3, FALSE) filters to North region rows and sorts by column 3 descending. This is one of the most common FILTER patterns: nest it inside SORT to get sorted subsets. Both are dynamic array functions so they compose cleanly.