The Excel FILTER function pulls the rows that meet your conditions out of a table and lists them somewhere else. The original table stays untouched, and the list updates when the data or the condition changes. It works in Microsoft 365, Excel 2024 and Excel 2021, but not in Excel 2019 or older. Every result below was worked out by hand from the 12-row table shown, so you can type it in and compare.

FILTER syntax
=FILTER(array, include, [if_empty])
array is what you want back: one column, several columns or the whole table, without the header row. include is a test that gives TRUE or FALSE for every row, such as B2:B13="Team 1". It must have the same number of rows as array. if_empty is optional text or a value to show when no row passes. Leave it out and an empty result shows #CALC!.

The example table
Type this into A1:D13. The headers are in row 1, so every formula below uses rows 2 to 13.
| A: Name | B: Team | C: City | D: Sales | |
|---|---|---|---|---|
| 2 | Mia | Team 1 | Austin | 520 |
| 3 | Noah | Team 2 | Boston | 380 |
| 4 | Liam | Team 1 | Denver | 450 |
| 5 | Emma | Team 2 | Austin | 610 |
| 6 | Zoe | Team 1 | Austin | 290 |
| 7 | Owen | Team 3 | Chicago | 700 |
| 8 | Ella | Team 2 | Austin | 470 |
| 9 | Jack | Team 3 | Boston | 330 |
| 10 | Ivy | Team 1 | Chicago | 560 |
| 11 | Leo | Team 3 | Austin | 410 |
| 12 | Ruth | Team 2 | Denver | 250 |
| 13 | Sam | Team 1 | Boston | 480 |
One condition
In an empty cell such as F2, type =FILTER(A2:D13,B2:B13="Team 1","No match") and press Enter. Five rows spill down and across from F2: Mia 520, Liam 450, Zoe 290, Ivy 560 and Sam 480. Only F2 holds the formula; the other cells are part of the spill and cannot be edited one by one. To get names only, use A2:A13 as the array and you get a five-cell list.
Two or more conditions: * for AND, + for OR
Wrap each test in its own parentheses. TRUE counts as 1 and FALSE as 0, so multiplying keeps a row only when every test is TRUE (AND), and adding keeps it when at least one is TRUE (OR).
| You want | Formula | Rows |
|---|---|---|
| Team 1 and sales of 450 or more | =FILTER(A2:D13,(B2:B13="Team 1")*(D2:D13>=450),"No match") | 4: Mia, Liam, Ivy, Sam |
| Austin or Boston | =FILTER(A2:D13,(C2:C13="Austin")+(C2:C13="Boston"),"No match") | 8 |
| Team 3 and Austin | =FILTER(A2:D13,(B2:B13="Team 3")*(C2:C13="Austin"),"No match") | 1: Leo 410 |
| Everyone outside Team 1 | =FILTER(A2:D13,B2:B13<>"Team 1","No match") | 7 |

Check the counts by hand. Team 1 has five people, and Zoe (290) falls below 450, which leaves four. Austin has five rows (Mia, Emma, Zoe, Ella, Leo) and Boston has three (Noah, Jack, Sam), so the OR list has eight. The only Team 3 person in Austin is Leo. Teams 2 and 3 together hold seven rows.
Sort, total and count the result
FILTER becomes more useful inside other functions. =SORT(FILTER(A2:D13,B2:B13="Team 1"),4,-1) sorts Team 1 by the fourth column, high to low: Ivy 560, Mia 520, Sam 480, Liam 450, Zoe 290. =SUM(FILTER(D2:D13,B2:B13="Team 1")) returns 2300 (520+450+290+560+480), and AVERAGE in place of SUM returns 460. For a top 3 of everyone, =TAKE(SORT(A2:D13,4,-1),3) gives Owen 700, Emma 610 and Ivy 560. TAKE is newer than FILTER, so check that your Excel version has it before sharing the file.
To count matches, =IFERROR(ROWS(FILTER(A2:D13,B2:B13="Team 1")),0) returns 5. The IFERROR matters: with no match, FILTER gives #CALC!, and you want 0 instead.
Partial matches and blank criteria
Wildcards such as * do not work in an equals test inside FILTER. For “contains”, combine ISNUMBER and SEARCH: =FILTER(A2:D13,ISNUMBER(SEARCH("o",A2:A13)),"No match") returns Noah, Zoe, Owen and Leo, the four names with an o. SEARCH ignores capitals, which is why Owen counts. Use FIND if case should matter.
For a small lookup screen, type a team name in H1 (or pick it from a drop-down) and use =FILTER(A2:D13,IF(H1="",B2:B13<>"",B2:B13=H1),"No match"). With H1 empty, every row with a team shows. With “Team 2” in H1, you get Noah, Emma, Ella and Ruth.
Tip: to see what include really contains, select B2:B13="Team 1" inside the formula bar and press F9. Excel shows the TRUE/FALSE list. Press Esc to undo, or the formula will be replaced by those values.
FILTER errors and fixes

#CALC! means no row passed and there is no third argument. Add one, such as “No match”. #VALUE! means include has a different height than array, for example FILTER(A2:D13,B2:B12="Team 1"). Make both end on row 13. #SPILL! means something sits in the cells the result needs, often a stray value or a merged cell. Clear the way and the list appears. #NAME? usually means the Excel version has no FILTER. A closed source workbook can return #REF! when FILTER points to another file.
One more habit: a plain range does not grow when you add row 14. Turn the data into a table with Ctrl+T, or the new row will be missed.
Google Sheets and older Excel
Google Sheets has FILTER too, with a different shape: =FILTER(A2:D13,B2:B13="Team 1",D2:D13>=450). Every extra condition is its own argument and all of them must be true, so the same four rows come back. There is no if_empty argument, and when nothing matches Google returns #N/A, so wrap it as =IFERROR(FILTER(...),"No match"). For OR in Sheets, add the tests inside one argument as in Excel.
In Excel 2019 or older, FILTER shows #NAME?. Use the Filter button on the Data tab (Ctrl+Shift+L), the Advanced Filter to copy results elsewhere, or SUMIFS and COUNTIFS if you only need totals and counts.

Frequently asked questions
What does the FILTER function do in Excel?
It returns only the rows of a range that pass a test, spilled into the cells below and to the right. =FILTER(A2:D13,B2:B13="Team 1") lists the five Team 1 rows.
How do I filter with two conditions?
Put each test in parentheses and multiply them for AND, or add them for OR. Team 1 with sales of 450 or more is (B2:B13="Team 1")*(D2:D13>=450).
Why does FILTER show #CALC!?
No row matched and the third argument is empty. Add text such as “No match” as if_empty.
Which Excel versions have FILTER?
Microsoft 365, Excel 2024 and Excel 2021, plus Excel for the web. Excel 2019 and older show #NAME?.
Can FILTER match part of a text?
Yes, with ISNUMBER and SEARCH inside include: ISNUMBER(SEARCH("o",A2:A13)). Wildcards do not work in an equals test.
Sources: Last checked November 2026. Microsoft Support: FILTER function; Exceljet: FILTER; Google: FILTER in Google Sheets.