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.
rowsis required;columnsis optional.- Absolute counts larger than the source dimension return
#VALUE!. - Empty selections return an empty spill.
Examples
Take top two rows
Grid
| Cell | Value | |
|---|---|---|
Formula
=
Result
Not evaluated yet.
Expected
[[10],[20]]
Take last row and last two columns
Grid
| Cell | Value | |
|---|---|---|
Formula
=
Result
Not evaluated yet.
Expected
[[5,6]]
Related functions
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-refRange · Range
arg2Number · Scalar · coercion NumberLenientText
arg3optionalNumber · Scalar · coercion NumberLenientText
Caps
PURE
Source