Formualizer Docs
ReferenceFunctionsLookup Functions

FILTER

Filters rows from an array using a Boolean include mask.

Summary

FILTER returns only rows where the include condition evaluates to true.

Remarks

  • include must have the same row count as array, or a single row used as broadcast.
  • A row is kept if any include cell for that row is truthy.
  • If no rows match, if_empty is returned when supplied; otherwise #CALC!.
  • Dimension mismatches return #VALUE!.
  • Results spill as dynamic arrays.

Examples

Filter active records
Grid
CellValue
Formula
=
Result
Not evaluated yet.
Expected
[["Ana"],["Cy"]]
Return fallback when no rows match
Grid
CellValue
Formula
=
Result
Not evaluated yet.
Expected
No matches

FAQ

What happens when include has no TRUE rows?

FILTER returns if_empty when provided; otherwise it returns #CALC! to signal an empty result set.

How strict is include shape matching?

include must match array row count or be a single broadcast row; incompatible dimensions return #VALUE!.

Runtime metadata

Category

Lookup

Signature

FILTER(arg1: Range (Range), arg2: Range (Range), arg3?…: Any)

Arity

min 2, max variadic

Arguments

arg1by-ref

Range · Range

arg2by-ref

Range · Range

arg3optional

Any · Scalar

Caps

PURE

Source

On this page