Formualizer Docs
ReferenceFunctionsLookup Functions

TAKE

TAKE: Returns a subset from the start or end of rows and optional columns.

Summary

TAKE extracts leading or trailing portions of an array based on signed counts.

Remarks

  • Positive counts take from the start; negative counts take from the end.
  • rows is required; columns is optional.
  • Absolute counts larger than the source dimension return #VALUE!.
  • Empty selections return an empty spill.

Examples

Take top two rows
Grid
CellValue
Formula
=
Result
Not evaluated yet.
Expected
[[10],[20]]
Take last row and last two columns
Grid
CellValue
Formula
=
Result
Not evaluated yet.
Expected
[[5,6]]

FAQ

How are negative rows or columns interpreted?

Negative counts take from the end of the array, so TAKE(...,-1) returns the last row and TAKE(...,,-1) returns the last column.

When does TAKE return #VALUE!?

If the absolute requested row or column count exceeds source dimensions, TAKE returns #VALUE!.

Runtime metadata

Category

Lookup

Signature

TAKE(arg1: Range (Range), arg2: Number, arg3?…: Number)

Arity

min 2, max variadic

Arguments

arg1by-ref

Range · Range

arg2

Number · Scalar · coercion NumberLenientText

arg3optional

Number · Scalar · coercion NumberLenientText

Caps

PURE

Source

On this page