TAKE Function in LibreOffice Calc
Use TAKE in LibreOffice Calc to keep leading or trailing rows and columns, with explicit counts, dimension checks and a documented one-argument caveat.
Verification status: Eight ordinary INDEX-selected components, dimension or padding-check expressions were recalculated in LibreOfficeDev 26.8.0.0.alpha0 (2c87e51eeaa2b413ff4ae097b2705eea1995d8e5) using headless XLSX import and forced recalculation. Exact identities, typed results and controls were checked. LibreOffice 26.8.1.1 was source-reviewed only; stable 25.8 and GUI array entry were not executed. How formula examples are checked
Quick answer: =INDEX(TAKE(H2:J3;1);1;1) returned 1 in the tested development build.
Availability and version history
- Introduced: LibreOffice 25.8, explicitly stated in function-specific Help.
- Supported in: 26.8 Help and 26.8.1.1 registration; no retirement is established.
- Scope: Desktop Calc, English semicolon-separated formulas. Help identifies the
COM.MICROSOFT.TAKEnamespace outside OpenFormula 1.3. - Checked: October 14, 2026. Eight listed component/dimension examples were recalculated in LibreOfficeDev 26.8.0.0.alpha0 using headless XLSX import. Stable 25.8, 26.8.1.1 and GUI array entry were not executed.
What TAKE returns
TAKE keeps a contiguous rectangular part of an existing array. Positive counts select from the beginning; negative counts select from the end. It preserves the selected order and does not sort, filter by a condition or modify the original cells. Function Help.
Syntax and arguments
TAKE(Array [; Rows [; Columns]])
Square brackets mark optional arguments; do not type them. Array is a range or matrix. Rows and Columns are signed integer counts. Supplying only Rows keeps every column; supplying Columns with an omitted Rows position keeps every row. In the inspected implementation, at least one count must be supplied, despite the optional-looking Help syntax.
For a whole-array result, the official Help instructs array-formula entry with Ctrl+Shift+Enter. The examples below instead select components with INDEX or inspect dimensions and padding. They do not establish a GUI spill or array-entry workflow.
Worksheet setup
Enter this source table in H2:J3:
| Row | H | I | J |
|---|---|---|---|
| 2 | 1 | 2 | 3 |
| 3 | 4 | 5 | 6 |
Eight reproducible examples
The native column is from LibreOfficeDev 26.8.0.0.alpha0, build 2c87e51eeaa2b413ff4ae097b2705eea1995d8e5, using headless XLSX import and forced recalculation. Text is shown in quotes.
| Formula | Independent reference | LibreOfficeDev result |
|---|---|---|
=INDEX(TAKE(H2:J3;1);1;1) |
1 |
1 |
=INDEX(TAKE(H2:J3;-1);1;3) |
6 |
6 |
=INDEX(TAKE(H2:J3;2;2);2;2) |
5 |
5 |
=INDEX(TAKE(H2:J3;-1;-2);1;1) |
5 |
5 |
=INDEX(TAKE(H2:J3;9);2;3) |
6 |
6 |
=INDEX(TAKE(H2:J3;1;-1);1;1) |
3 |
3 |
=ROWS(TAKE(H2:J3;-1)) |
1 |
1 |
=COLUMNS(TAKE(H2:J3;2;-2)) |
2 |
2 |
Practical worksheet
For the two-row table H2:J3 shown here, =TAKE(H2:J3;-1;-2) selects the final row and its final two columns, yielding the row 5, 6. This is useful for extracting the most recent record only when the table is already in the required order. A negative count selects physical position, not the largest date. =INDEX(TAKE(H2:J3;-1;-2);1;1) checks the first selected value, 5, without requiring a displayed two-cell array.
Advanced interpretation and checks
For an input with m rows and n columns, a nonzero row request r keeps min(abs(r),m) rows; a nonzero column request c similarly keeps min(abs(c),n) columns. Oversized TAKE counts retain the full corresponding dimension, as the nine-row request in the table demonstrates. Row and column signs are independent. Selecting the last row and first two columns therefore yields 4, 5 rather than reversing either dimension. Inspected implementation.
Boundaries and troubleshooting
Help/source disagreement: the current Help shows a one-argument TAKE call as an array copy. The complete 26.8.1.1 shared callback instead rejects a call with neither count present. Use an explicit count and do not rely on that copy example. This disagreement was source-checked; the one-argument call was not executed. The same callback sends an empty selection caused by a zero count to #N/A. Use positive integer magnitudes for ordinary selection; fractional conversion, extreme sizes and error propagation were not executed.
Related functions
Official evidence and checking scope
- Function-specific Help
- Complete versioned callback
- English native-name registration
- Complete shared implementation
- Typed value/empty-cell copy helper
All eight saved formula identities and their typed results were reconciled. The stale SUM cache changed to 3 and the uncached SUM returned 7. Imported _xlfn.TAKE formulas were saved with the documented COM.MICROSOFT.TAKE identity. These checks establish the listed development-build components only; current-source guards and unexecuted cases remain source-derived.