Syntax
=TAKE(array, rows, [columns])Arguments
| Argument | Required | Description |
|---|---|---|
array | Required | The range or array |
rows | Required | Rows to take (negative from the end) |
columns | Optional | Columns to take (negative from the end) |
How to use TAKE
When TAKE returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.
TAKE takes 2 required arguments and 1 optional argument. Type =TAKE( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=TAKE({1,2;3,4;5,6}, 2)Result Spilled result
| A | B | |
|---|---|---|
| 1 | 1 | 2 |
| 2 | 3 | 4 |
=TAKE({1,2;3,4;5,6}, -1, 1)Result =TAKE({1,2}, 0)Result Related array functions
- SEQUENCEReturns a list of sequential numbers in an array of the given size.
- SORTSorts the rows or columns of a range or array.
- SORTBYSorts a range or array by the values of other ranges or arrays.
- SORTNReturns the first n rows of a range after sorting, with options for ties.
- TOCOLReturns the values of an array as a single column.
- TOROWReturns the values of an array as a single row.
- TRIMRANGERemoves empty rows and columns from the edges of a range.
- UNIQUEReturns the unique rows (or columns) of a range or array.
- VSTACKStacks arrays on top of each other; shorter rows are padded with #N/A.