FILTER returns the rows of a range that meet a condition you specify, spilling the matching records into adjacent cells. If no rows match, it can return a custom message instead of an error.
=FILTER(array, include, [if_empty])What does FILTER do?
FILTER is a dynamic array function that looks through a range and returns only the rows that satisfy a test you define. You give it the data, a condition that evaluates to TRUE or FALSE for each row, and optionally a message to show when nothing matches. The result spills into the cells below and to the right of the formula, so you get a live, filtered copy of your data without sorting or hiding anything.
Before FILTER, extracting matching rows meant advanced filters, helper columns, or copying and pasting. FILTER does it with one formula that updates automatically when the source data changes. It is especially useful for dashboards, reports, and any situation where you need a clean subset of a larger table.
Imagine you have a sales table with region, product, and amount. You want a list of all orders from the North region, or all orders above a certain value. With FILTER you write one formula and the matching rows appear instantly. If you add new orders to the source table, the filtered list grows or shrinks to match.
When to use FILTER
- Pull all records for a specific customer, region, or category from a master list.
- Show only rows where a value is above or below a threshold, such as sales over 1000.
- Create a dynamic report that updates as new data is added to the source table.
- Combine with SORT to display filtered results in a chosen order.
- Extract rows that meet two or more conditions using multiplication or the AND logic.
- Return a friendly message like 'No results' when nothing matches instead of an error.
FILTER syntax
=FILTER(array, include, [if_empty])| Argument | Required? | What to enter |
|---|---|---|
array | Required | The range or table you want to filter. Example: A2:C10. |
include | Required | A condition that returns TRUE or FALSE for each row. Example: B2:B10>1000. |
if_empty | Optional | What to return when no rows match. Example: "No results". |
What it returns: FILTER returns a dynamic array of the rows that meet the include condition. If no rows match and if_empty is provided, it returns that value; otherwise it returns #CALC!.
FILTER examples
1 Example 1: Filter by one text condition
You have a small sales table and want only the rows where the region is North. The formula checks each cell in the Region column against "North". It returns the matching rows as a spilled array. Because the condition is a single column, the result includes all columns of the table.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Sales | Product | |||
| 2 | North | 1200 | Widget | North | ||
| 3 | South | 800 | Gadget | |||
| 4 | North | 1500 | Widget | |||
| 5 | East | 950 | Gizmo | |||
| 6 | North | 1100 | Gadget | |||
| 7 |
2 Example 2: Filter with a numeric condition
Here you want only the rows where Sales are greater than 1000. The include argument compares each sales value to 1000. FILTER returns the rows that pass the test, including all columns. This is handy for spotting high-value orders quickly.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Sales | Product | |||
| 2 | North | 1200 | Widget | North | ||
| 3 | South | 800 | Gadget | |||
| 4 | North | 1500 | Widget | |||
| 5 | East | 950 | Gizmo | |||
| 6 | North | 1100 | Gadget | |||
| 7 |
3 Example 3: Filter with two conditions (AND logic)
You need rows where the region is North and sales are above 1000. The formula multiplies two conditions: (A2:A6="North")*(B2:B6>1000). In Excel, TRUE*TRUE equals 1, so only rows where both conditions are true pass the test. FILTER returns those rows.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Sales | Product | |||
| 2 | North | 1200 | Widget | North | ||
| 3 | South | 800 | Gadget | |||
| 4 | North | 1500 | Widget | |||
| 5 | East | 950 | Gizmo | |||
| 6 | North | 1100 | Gadget | |||
| 7 |
4 Example 4: Filter with a custom message when empty
You want to list orders from the West region, but there are none in the data. The formula includes the optional if_empty argument: "No West orders". Because no rows match, FILTER returns that text instead of an error. This keeps reports clean and readable.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Sales | Product | |||
| 2 | North | 1200 | Widget | No West orders | ||
| 3 | South | 800 | Gadget | |||
| 4 | North | 1500 | Widget | |||
| 5 | East | 950 | Gizmo | |||
| 6 | North | 1100 | Gadget | |||
| 7 |
Common FILTER errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #CALC! | No rows match the condition and no if_empty argument was provided. | Add the optional if_empty argument, for example "No results". |
| #VALUE! | The include argument does not return an array of TRUE/FALSE values, often because ranges are different sizes. | Make sure the include range has the same number of rows as the array, and use a comparison that yields TRUE/FALSE. |
| #SPILL! | There is not enough empty space for the result to spill into. | Clear the cells below and to the right of the formula, or move the formula to an area with more room. |
| #NAME? | The function name is misspelled or the version of Excel does not support FILTER. | Check the spelling and ensure you are using Excel 365 or Excel 2021 or later. |
Tips for using FILTER
- Use multiplication (
*) for AND conditions and addition (+) for OR conditions inside the include argument. - Wrap text criteria in double quotes, for example
"North", and use cell references for flexible criteria. - Combine FILTER with SORT to present results in a specific order, for example
=SORT(FILTER(...)). - Always provide an if_empty message to avoid #CALC! errors in reports.
- Remember that FILTER returns a dynamic array; leave enough empty cells for the result to spill.
- Use entire column references like
A:Aonly when necessary, as they can slow down large workbooks.
Frequently asked questions
What does the FILTER function do in Excel?
FILTER returns the rows of a range that meet a condition you specify. It is a dynamic array function, so the results spill into adjacent cells and update automatically when the data changes.
Can FILTER use multiple conditions?
Yes. Combine conditions with multiplication for AND logic (both must be true) or addition for OR logic (either can be true). For example, (A2:A10="North")*(B2:B10>1000) requires both conditions.
Why does FILTER return #CALC!?
This happens when no rows match and you did not provide the optional if_empty argument. Add a value such as "No results" as the third argument to display a custom message instead.
Is FILTER available in all Excel versions?
No. FILTER is available in Excel for Microsoft 365, Excel 2021, and later. It is not available in older versions like Excel 2019 or Excel 2016.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. FILTER reference