Skip to content

Array Functions

TRANSPOSE

Converts rows to columns and vice versa.

=TRANSPOSE(A1:C3)

A 3x3 range will be flipped so that rows become columns.

FLATTEN

Converts a multi-dimensional range into a single column.

=FLATTEN(A1:C3)

UNIQUE

Returns unique values from a range, removing duplicates.

=UNIQUE(A1:A20)

SORT

Sorts a range by a specified column.

=SORT(A1:C10, 2, TRUE)

Sorts by the 2nd column in ascending order. Use FALSE for descending.

SORTBY

Sorts a range by a separate sort-key range.

=SORTBY(A1:B10, B1:B10, -1)

Sorts A1:B10 by column B in descending order (-1).

FILTER

Returns rows from a range that meet a condition.

=FILTER(A1:C10, B1:B10>50)

Returns all rows where column B is greater than 50.

SEQUENCE

Generates a sequence of numbers.

=SEQUENCE(rows, [cols], [start], [step])

=SEQUENCE(5, 1, 1, 2) produces 1, 3, 5, 7, 9 in a column.

ARRAYFORMULA

Applies a formula across a range, returning multiple results.

=ARRAYFORMULA(A1:A10 * B1:B10)

Multiplies each pair of cells and returns all results at once.