FILTER pulls the rows you want out of a table with a single formula. Point it at the table, give it a test, and it returns every row where the test is TRUE. When the data changes, the result changes with it.
The three arguments
- array is the data to return. It can be several columns wide, and you get all of them back.
- include is a test that produces one TRUE or FALSE per row, such as
B2:B9="North" or D2:D9>=1000. It must have the same number of rows as array. The test works on whole columns at once, so you don't fill the formula down. - if_empty is what to show when nothing passes. Without it, an empty result is
#CALC!.
AND and OR
To keep rows that meet two conditions, multiply the tests: (B2:B9="North")*(D2:D9>=700). Each TRUE counts as 1 and each FALSE as 0, so the product is 1 only when both are TRUE. To keep rows that meet either condition, add the tests: (B2:B9="East")+(B2:B9="West"). Any result above 0 counts as TRUE.
How spilling works
FILTER returns many cells from one formula. Excel puts the formula in the cell you typed it into, the anchor, and fills the cells below and to the right with the rest of the result. Those cells belong to the formula: you can't type in them, and they shrink or grow when the number of matches changes. The outlined block is the spill range.
If any cell in that block already holds something, Excel returns #SPILL! in the anchor and fills nothing. Clear the blocking cell, or move the formula, and the result appears. Merged cells and Excel tables also block a spill, because a table can't contain a dynamic array formula.
To refer to a whole spill range from another formula, add # after the anchor cell: =SUM(F2#) or =ROWS(F2#). The # follows the spill as it changes size, so you never need to adjust the range.
What FILTER doesn't do
FILTER doesn't sort. Wrap it in SORT, as in =SORT(FILTER(...),4,-1), when order matters. It has no wildcard matching: "No*" is read as literal text. To match part of a word, test with ISNUMBER(SEARCH("tape",C2:C9)). Text comparisons ignore case.
FILTER also replaces a lot of older work. Where you once needed an advanced filter, a helper column or an INDEX/SMALL array formula, one FILTER formula now does it, and it stays live. The trade-off is compatibility: Excel 2019 and earlier show #NAME?.