The FILTER function

Returns the rows of a range that meet a condition, as a list that spills into the cells below.

Syntax

FILTER(array, include, [if_empty])
array
The range to filter.
include
A condition per row, such as A2:A6="South".
if_empty (optional)
What to return when no rows match, instead of #CALC!. Excel only: Google Sheets reads extra arguments as more conditions.

Examples

E1=FILTER(C2:C6,A2:A6="South")
ABCDE
1RegionProductSales300
2NorthShoes500180
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

In plain words: Return the sales in C2:C6 on the rows where the region in A2:A6 is South.

E1=FILTER(A2:A6,C2:C6>1000,"None")
ABCDE
1RegionProductSalesNone
2NorthShoes500
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

Practice FILTER

Read the guide

Questions

Does FILTER work the same in Google Sheets?

Mostly. Google Sheets has no if_empty argument: extra arguments are more conditions, and it returns #N/A when no rows match. Wrap it in IFNA to show your own text, such as =IFNA(FILTER(A2:A6,C2:C6>1000),"None").

Related functions