Formualizer Docs
ReferenceFunctionsLookup Functions

CHOOSEROWS

CHOOSEROWS: Returns selected rows from an array or range.

Summary

CHOOSEROWS builds a new spilled array containing only the requested rows, in the order provided.

Remarks

  • Row indexes are 1-based; negative indexes count from the end (-1 is last row).
  • Repeated indexes are allowed and duplicate rows in the output.
  • Index 0 or out-of-bounds indexes return #VALUE!.
  • The result spills as an array unless it collapses to a single cell.

Examples

Pick first and last rows
Grid
CellValue
Formula
=
Result
Not evaluated yet.
Expected
[["Jan"],["Mar"]]
Duplicate a row in output
Grid
CellValue
Formula
=
Result
Not evaluated yet.
Expected
[[9],[9]]

FAQ

Can I return rows in a custom order?

Yes. CHOOSEROWS returns rows in the exact order of the supplied indexes, and repeated indexes duplicate rows.

When does CHOOSEROWS return #VALUE!?

It returns #VALUE! for index 0 and for row indexes outside the source height after applying negative-index conversion.

Runtime metadata

Category

Lookup

Signature

CHOOSEROWS(arg1: Range | Any (Range), arg2…: Number)

Arity

min 2, max variadic

Arguments

arg1

Range | Any · Range

arg2repeating 1

Number · Scalar · coercion NumberLenientText

Caps

PURELOOKUP

Source

On this page