Formualizer Docs
ReferenceFunctionsLookup Functions

UNIQUE

UNIQUE: Returns distinct rows or columns from a range.

Summary

UNIQUE preserves first-occurrence order and can optionally return only values that appear once.

Remarks

  • Defaults: by_col=FALSE, exactly_once=FALSE.
  • With by_col=FALSE, uniqueness is evaluated by full rows.
  • With by_col=TRUE, uniqueness is evaluated by full columns.
  • With exactly_once=TRUE, only entries with frequency 1 are returned.
  • Result spills as an array.

Examples

Unique values by row
Grid
CellValue
Formula
=
Result
Not evaluated yet.
Expected
[["A"],["B"],["C"]]
Only values that appear once
Grid
CellValue
Formula
=
Result
Not evaluated yet.
Expected
[[2],[3]]

FAQ

What does exactly_once=TRUE change?

Instead of returning first occurrences, UNIQUE returns only rows or columns whose full key appears exactly one time.

How does by_col affect uniqueness checks?

by_col=FALSE compares entire rows, while by_col=TRUE compares entire columns and spills unique columns.

Runtime metadata

Category

Lookup

Signature

UNIQUE(arg1: Range (Range), arg2?: Logical, arg3?…: Logical)

Arity

min 1, max variadic

Arguments

arg1by-ref

Range · Range

arg2optionaldefault

Logical · Scalar · coercion Logical

arg3optionaldefault

Logical · Scalar · coercion Logical

Caps

PURE

Source

On this page