DROP Function in LibreOffice Calc
Remove leading or trailing rows and columns with LibreOffice Calc DROP; compare zero counts, retained dimensions and limits against reproducible examples.
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(DROP(H2:J3;1);1;1) returned 4 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.DROPnamespace 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 DROP returns
DROP returns the part of an array left after removing contiguous edge rows or columns. Positive counts remove from the start and negative counts remove from the end. The source table remains unchanged, and the surviving cells keep their original order. Function Help.
Syntax and arguments
DROP(Array; Rows [; Columns])
Square brackets mark optional arguments; do not type them. Array is a range or matrix. Rows is the signed number of rows to remove. Columns is an optional signed number of columns. A zero row count is useful when removing only columns; an omitted Columns argument preserves every column. Use integer counts smaller in magnitude than the affected dimension.
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(DROP(H2:J3;1);1;1) |
4 |
4 |
=INDEX(DROP(H2:J3;-1);1;3) |
3 |
3 |
=INDEX(DROP(H2:J3;0;1);2;1) |
5 |
5 |
=INDEX(DROP(H2:J3;0;-1);2;2) |
5 |
5 |
=INDEX(DROP(H2:J3;1;-1);1;2) |
5 |
5 |
=INDEX(DROP(H2:J3;0);2;3) |
6 |
6 |
=ROWS(DROP(H2:J3;1)) |
1 |
1 |
=COLUMNS(DROP(H2:J3;0;-2)) |
1 |
1 |
Practical worksheet
Suppose H2:J3 represents two records with an unwanted final field. =DROP(H2:J3;0;-1) keeps both records and removes the final column, leaving rows 1, 2 and 4, 5. The zero is intentional: it prevents any row from being removed. =INDEX(DROP(H2:J3;0;-1);2;2) returns 5. To remove the first record as well as the last field, use the same operation with Rows set to 1.
Advanced interpretation and checks
If the input has m rows and n columns, valid nonzero removals r and c leave m−abs(r) rows and n−abs(c) columns. Zero leaves that dimension unchanged. The source uses the signs to choose which boundary moves; it does not reverse the result. =DROP(H2:J3;1;-1) therefore leaves 4, 5. Removing nothing with =DROP(H2:J3;0) retains the whole table in the tested development build. Inspected implementation.
Boundaries and troubleshooting
Do not use DROP to request an empty result. The inspected callback rejects a removal whose magnitude is equal to or greater than the affected dimension. This differs from TAKE, which can clamp a larger request to the available size. The shared implementation also requires at least one count. Those invalid-domain outcomes were source-reviewed rather than executed. Test headers and record order before dropping a fixed number of rows; DROP does not recognize header labels.
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.DROP formulas were saved with the documented COM.MICROSOFT.DROP identity. These checks establish the listed development-build components only; current-source guards and unexecuted cases remain source-derived.