7FEnC‖

pB7UF‖TAKE

M8amC‖Returns a specified number of contiguous rows or columns from the start or end of an array.

note

iZ2w7‖Enter the formula as an array formula. Hint: enter formula using keys Ctrl + Shift + Enter.


ebLBc‖Syntax

hEfgM‖=TAKE(Array; Rows [; Columns])

A2PcT‖Array: the array or range from which to take rows or columns.

VY85L‖Rows: the number of rows to take. A negative value takes from the end of the array.

MGCkb‖Columns: (optional) the number of columns to take. A negative value takes from the end of the array.

note

s37P8‖Any of the optional arguments can be omitted. An optional argument requires all preceding separators to be present.


GAZG2‖Examples

KAvDE‖Consider the array A1:E3 below:

 

A

B

C

D

E

1

AAA

BBB

CCC

DDD

EEE

2

FFF

 

 

III

JJJ

3

KKK

LLL

MMM

NNN

OOO


CfyGu‖The formula {=TAKE(A1:E3;;1)} returns the array with 3 rows (default) and 3 columns.

AAA

BBB

CCC

FFF

 

 

KKK

LLL

MMM


yhCLT‖The formula {=TAKE(A1:E3;2;4)} returns the array below with 2 rows and 4 columns.

AAA

BBB

CCC

DDD

FFF

 

 

III


BQjC5‖The formula {=TAKE(A1:E3;-2;-2)} returns the array below taking 2 rows starting from the last row and 2 columns starting from the last column.

III

JJJ

NNN

OOO


XAFa7‖Technical information

tip

QgTYx‖This function is available since LibreOfficeDev 25.8.


2C7vt‖This function is NOT part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.TAKE