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/A if no rows match. Wrap in IFERROR(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
QUERY()
Runs a Google Visualization API Query Language query across data.
SORT()
Sorts the rows of a range by values in one or more columns.
UNIQUE()
Returns unique rows in the provided source range, discarding duplicates.
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.