VSTACK Function in LibreOffice Calc
Append LibreOffice Calc tables vertically with VSTACK; verify row order, unequal-width #N/A padding and output dimensions before combining records.
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(VSTACK(H2:J3;L2:M4);3;1) returned 10 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.VSTACKnamespace 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 VSTACK returns
VSTACK appends arrays vertically in argument order. The first array appears above the next. Shorter-width arrays receive #N/A in the missing columns, so the result remains rectangular. VSTACK does not reconcile different field names, remove duplicate headers or sort the combined records. Function Help.
Syntax and arguments
VSTACK(Array [; Array_1 [; Array_2 [; …]]])
Square brackets mark optional arguments; do not type them. Supply one or more ranges or arrays. Omit unused trailing arguments rather than leaving an explicit empty argument; the inspected callback rejects a missing array token. The output height is the sum of input heights and its width is the maximum input width.
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 |
Enter a second table in L2:M4:
| Row | L | M |
|---|---|---|
| 2 | 10 | 20 |
| 3 | 30 | 40 |
| 4 | 50 | 60 |
Eight reproducible examples
The native column is from LibreOfficeDev 26.8.0.0.alpha0, build 2c87e51eeaa2b413ff4ae097b2705eea1995d8e5, using headless XLSX import and forced recalculation. TRUE is a Boolean result from the padding check, not an error value. Text is shown in quotes.
| Formula | Independent reference | LibreOfficeDev result |
|---|---|---|
=INDEX(VSTACK(H2:J3;L2:M4);3;1) |
10 |
10 |
=INDEX(VSTACK(H2:J3;L2:M4);5;2) |
60 |
60 |
=ISNA(INDEX(VSTACK(H2:J3;L2:M4);3;3)) |
TRUE |
TRUE |
=ROWS(VSTACK(H2:J3;L2:M4)) |
5 |
5 |
=COLUMNS(VSTACK(H2:J3;L2:M4)) |
3 |
3 |
=INDEX(VSTACK(L2:M4;H2:J3);4;3) |
3 |
3 |
=INDEX(VSTACK(H2:J3);2;2) |
5 |
5 |
=INDEX(VSTACK(H2:J2;H3:J3;L2:M4);2;3) |
6 |
6 |
Practical worksheet
Combine H2:J3 with L2:M4 using =VSTACK(H2:J3;L2:M4). The result has five rows and three columns. The first two rows remain 1, 2, 3 and 4, 5, 6. The next three rows begin 10, 20; 30, 40; and 50, 60, with #N/A in their third column. Before using this approach for monthly records, make sure each source column has the same meaning. Equal physical position alone does not establish matching fields.
Advanced interpretation and checks
For inputs m₁×n₁ and m₂×n₂, VSTACK produces m₁+m₂ rows and max(n₁,n₂) columns. Reversing the example’s arguments puts the three-row table first, making the first original table’s final-column value 3 appear at result row 4, column 3. Splitting H2:J3 into its two row ranges and passing those separately gives the same leading record order. Neither operation removes a header row automatically. Inspected implementation.
Boundaries and troubleshooting
Default #N/A padding marks positions outside a shorter input’s width. It should not be confused with a genuine empty cell in the source or a formula returning empty text. Preserve the marker until a business rule determines how missing fields should be represented. The tested component checks cover dimensions, order and selected padding only; they do not certify all downstream aggregation or GUI array-entry behavior.
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.VSTACK formulas were saved with the documented COM.MICROSOFT.VSTACK identity. These checks establish the listed development-build components only; current-source guards and unexecuted cases remain source-derived.