Arraymedium
FILTER()
Returns a filtered version of the source range, returning only rows or columns which meet the conditions.
Syntax
fx
=FILTER(range, condition1, [condition2, ...])
Example
fx
=FILTER(A:C, B:B>1000)
Paste this into Google Sheets to run it. The live playground on this site covers 24 of the 61 functions, and FILTER isn't one of them yet.
Common pitfalls
- Each condition must be a 1-D range the same length as the source rows. Mismatched shapes return
#N/A. - Returns
#N/Aif no rows match. Wrap inIFERROR(FILTER(...), "none")for a friendly fallback. - Conditions are AND-ed when listed. For OR, ADD boolean ranges (use
*for AND):(A:A="x") + (A:A="y").
Related formulas
Used by
ARRAYFORMULA()
Enables the display of values returned from an array formula into multiple rows/columns.
QUERY()
Runs a Google Visualization API Query Language query across data.
UNIQUE()
Returns unique rows in the provided source range, discarding duplicates.
SORT()
Sorts the rows of a range by values in one or more columns.
SORTN()
Returns the first n items of a sorted range, for top-N or bottom-N selection.
SEQUENCE()
Generates a sequence of numbers, returned as an array of the requested shape.