Home  /  Blog  /  Lookup & Filter
Lookup & Filter

FILTER Function in Excel (With Examples)

By admin 26 November 2026 Lookup & Filter

You have a list of orders and you only want the East ones — or the ones above $1,000 — and every time the list changes you filter it again by hand. The FILTER function does this once, with a formula: you type it in one cell, Excel pulls out every matching row into a new list, and when the data changes the list updates itself. It is not the same as the Filter button on the Data tab — that button only hides rows on the same sheet, while FILTER builds a live, separate list you can use anywhere. This guide gives you the formula first, works it through on a small sales table you can check by hand, shows you the one trick for two conditions, and fixes the two errors that catch everyone, #CALC! and #SPILL!.

Quick takeaway: FILTER builds a live list of matching rows.

  • Formula: =FILTER(array, include, [if_empty])
  • array is the data, include is the test (TRUE/FALSE) for each row.
  • Type it once in the top-left cell — Excel spills the rest. Never drag it down.
  • Two conditions: multiply for AND, add for OR. AND() does not work inside FILTER.
  • Available in Microsoft 365, Excel 2021 and 2024. Not in Excel 2019 or earlier.
FILTER Function in Excel (With Examples)

FILTER Function vs the Filter Button — Which One Do You Need?

Both are called “filter”, and they do different jobs.

Filter button (AutoFilter)FILTER function
What it doesHides rows on the same sheetBuilds a new, separate list of matching rows
Updates when data changesYou re-filter by handAutomatically — it is a formula
The resultA view of the same tableA live list you can use in other formulas
Where it livesData tab → FilterA formula in a cell
Works in old ExcelYes, every versionNo — Microsoft 365, 2021, 2024 only

Use the Filter button when you just want to look at part of a list. Use the FILTER function when you want a separate list that stays up to date — for a report, a dashboard, or another formula. This article is about the function.

What Is the FILTER Function?

The FILTER function returns every row of a range that meets one or more conditions, as a dynamic array — a result that spills into the cells below and to the right automatically, and updates when the source data or the conditions change.

=FILTER(array, include, [if_empty])
  • array is required — the range or table you want to filter.
  • include is required — a test that gives TRUE or FALSE for each row, like B2:B7="East". FILTER keeps only the rows where the test is TRUE.
  • if_empty is optional — what to return when no rows match. Leave it out and FILTER shows a #CALC! error when nothing matches.

The worked examples below use one small sales table, so you can check every result by hand.

OrderRegionItemAmount
101EastChairs1200
102WestLamps800
103EastTables1500
104WestChairs400
105EastLamps950
106WestTables2100

The table sits in A1:D7 (headers in row 1, data in rows 2 to 7).

How to Use the FILTER Function — Step by Step

  1. Click the cell where the new list should start — the top-left cell.
  2. Type =FILTER( and then the range to filter, for example A2:D7.
  3. Type a comma, then the test, for example B2:B7="East".
  4. Close the bracket and press Enter.
  5. Excel spills the matching rows below and to the right. Do not drag the formula down — one formula, one cell, and Excel does the rest.

Example: =FILTER(A2:D7, B2:B7="East") returns 3 rows — orders 101, 103 and 105. Check it: those are the only rows with East in column B.

Worked Example — One Condition

Filter the amounts above $1,000:

=FILTER(D2:D7, D2:D7>1000)

Result: 1200, 1500, 2100. Check it: the amounts are 1200, 800, 1500, 400, 950, 2100 — only 1200, 1500 and 2100 are above 1,000.

Filter the whole rows where the item is Chairs:

=FILTER(A2:D7, C2:C7="Chairs")

Result: orders 101 and 104. Check it: Chairs appears in rows 2 and 5 of the data.

Worked Example — Two Conditions (AND and OR)

FILTER has only one include argument, so two conditions go into a single test. The trick is arithmetic, not AND() or OR():

  • AND (both must be true): multiply with *. TRUE is 1 and FALSE is 0, so the product is 1 only when both are true.
  • OR (either can be true): add with +. The sum is 1 or more when at least one is true.

Put each condition in its own brackets. Leaving the brackets out is the most common cause of wrong results.

AND — East orders above $1,000:

=FILTER(A2:D7, (B2:B7="East")*(D2:D7>1000))

Result: orders 101 and 103. Check it: East rows are 101 (1200), 103 (1500) and 105 (950). Of those, only 101 and 103 are above 1,000 — 105 is 950, so it drops out.

OR — Chairs or Lamps:

=FILTER(A2:D7, (C2:C7="Chairs")+(C2:C7="Lamps"))

Result: orders 101, 102, 104 and 105. Check it: Chairs are 101 and 104, Lamps are 102 and 105 — four rows in total, and the two Tables orders (103, 106) are left out.

Do not use AND() or OR() inside FILTER — they collapse the whole test into a single TRUE or FALSE instead of one value per row, and the formula breaks. The * and + trick is the whole method.

What If Nothing Matches? — The if_empty Argument

If no rows meet the test and you left out if_empty, FILTER shows a #CALC! error. That is not a bug — it is Excel telling you the list is empty.

=FILTER(A2:D7, B2:B7="North", "No orders found")

Result: “No orders found” — there are no North rows in the table, so the message appears instead of #CALC!.

Use if_empty for a friendly message, or for a fallback: =FILTER(MasterList, MasterList[Region]=$H$2, MasterList) returns the whole table when the dropdown in H2 is blank, instead of an error. That is the pattern to use for a dropdown-driven filter (below).

Making the Filter Follow a Dropdown

Put the region in a cell — say H2 — and point the test at it:

=FILTER(A2:D7, B2:B7=$H$2)

Change H2 from East to West and the list changes with it. Add the if_empty fallback so a blank H2 shows the whole table instead of #CALC!:

=FILTER(A2:D7, B2:B7=$H$2, A2:D7)

And to sort the result by amount, largest first, wrap it in SORT:

=SORT(FILTER(A2:D7, B2:B7="East"), 4, -1)

Result: order 103 (1500), 101 (1200), 105 (950). The 4 means “sort by the 4th column” (Amount), and −1 means largest first.

Using FILTER Inside Other Formulas

Because FILTER returns a live list, you can feed it straight into another function. To add up the amounts of all Chairs and Lamps orders:

=SUM(FILTER(D2:D7, (C2:C7="Chairs")+(C2:C7="Lamps")))

Result: 3350. Check it: 1200 + 800 + 400 + 950 = 3350. The same idea works with AVERAGE, COUNT and MAX — FILTER first, then the function that does the maths. For the building blocks, see the SUM formula guide.

Common Mistakes

MistakeWhat happensFix
You used the Filter button and expected a live listThe rows are hidden, not copied — nothing updatesUse the FILTER function for a live list
You dragged the formula downEvery copy spills and they block each other — #SPILL!Type it once, in the top-left cell only
Something is in the way below the formula#SPILL! — Excel has nowhere to put the resultsClear the cells below and to the right
Nothing matches and you left out if_empty#CALC! errorAdd if_empty: =FILTER(A2:D7, B2:B7="North", "No orders found")
You used AND() or OR() inside FILTERThe test collapses to one value and the formula breaksUse * for AND, + for OR, with brackets around each test
You left out the brackets around a conditionThe maths applies in the wrong order and rows are wrongBracket each test: (B2:B7="East")*(D2:D7>1000)
Your test range is a different size from your data#VALUE! — the test must match the data row for rowMake include the same height as array
You have Excel 2019 or earlier#NAME? — FILTER does not exist in your versionUse Advanced Filter, or an INDEX/SMALL array formula
You typed the region with a different spellingNo rows match — “east” is not “East” to ExcelMatch the text exactly, or use UPPER/LOWER on both sides

Frequently Asked Questions

What is the FILTER function in Excel? =FILTER(array, include, [if_empty]). It returns every row of a range that meets your test, as a live list that spills below the formula cell and updates when the data changes.

How do I filter data in Excel with a formula? Use =FILTER(A2:D7, B2:B7="East") — the first part is the data, the second part is the test. Type it once and Excel spills the matching rows.

How do I use FILTER with multiple criteria in Excel? Put each condition in brackets and join them: * for AND, + for OR. Example: =FILTER(A2:D7, (B2:B7="East")*(D2:D7>1000)) for East AND above $1,000.

What is the difference between FILTER and the Filter button? The Filter button hides rows on the same sheet. FILTER builds a separate, live list that updates automatically and can feed other formulas.

Why does FILTER show #CALC!? No rows matched your test and you left out if_empty. Add it: =FILTER(A2:D7, B2:B7="North", "No orders found").

Why does FILTER show #SPILL!? Something is blocking the cells where the results should go — either data in the way, or a copied formula below. Clear the cells under the formula, and type the formula only once.

Does FILTER work in Excel 2019? No. FILTER needs Microsoft 365, Excel 2021 or Excel 2024 (or Excel for the web). In 2019 or earlier it shows #NAME?. Use Advanced Filter or an INDEX/SMALL array formula instead.

How do I filter by a dropdown in Excel? Point the test at the dropdown cell: =FILTER(A2:D7, B2:B7=$H$2). Add if_empty so a blank dropdown shows the whole table instead of #CALC!.

That is the whole method: the data, one test per row, and the brackets-and-arithmetic trick for two conditions — * for AND, + for OR. It works for one condition or many, for a dropdown-driven list, and inside SUM and AVERAGE, and the only cases that need extra care are a blocked spill range and a version of Excel that does not have the function. Try it on your own list now, with the sales table above, and when you need to look up a single value instead of a whole list, the next guides to read are the XLOOKUP vs VLOOKUP guide and the VLOOKUP formula guide — FILTER pulls out every match, while a lookup pulls out one.


About admin

Author of Excel formula guides on this blog.

View all guides by admin →

Keep Learning

Related guides