How to stack two tables on top of each other in Excel
Formula (Excel and Google Sheets)
=VSTACK(A2:C5,E2:G6)Use VSTACK with both ranges: =VSTACK(A2:C5,E2:G6) returns the rows of the first table followed by the rows of the second.
- Result on the example
- a 9-row list that spills from I2 in
I2 - Works in
- Excel 2024 and Microsoft 365
- Google Sheets
- Same formula
See it work
The formula is already in I2. Change any input and the result updates, or edit the formula to experiment.
How it works
VSTACK appends arrays vertically: every row of A2:C5, then every row of E2:G6. The tables have the same three columns, so the result lines up under one header. It updates when a value in either table changes.
=VSTACK(A2:C5,E2:G6)Result{9 rows × 3 cols} "Austin", "South", 48200, "Boston", …
A2:C54 rows × 3 cols: "Austin", "South", $48,200, "Boston", …A range: 4 rows × 3 columns.
E2:G65 rows × 3 cols: "Denver", "West", $39,800, "Miami", …A range: 5 rows × 3 columns.
VSTACK(A2:C5,E2:G6){9 rows × 3 cols} "Austin", "South", 48200, "Boston", …VSTACK: Stacks ranges on top of each other.- array1
A2:C54 rows × 3 cols: "Austin", "South", $48,200, "Boston", … - array2
E2:G65 rows × 3 cols: "Denver", "West", $39,800, "Miami", …
- array1
In Google Sheets
The same formula works in Google Sheets: =VSTACK(A2:C5,E2:G6). We ran it in Google Sheets mode on the same data and it returns the same results, spilling 9 rows.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =VSTACK(A1:C5,E2:G6) | spills 10 × 3Different result | Start the first range on its header row to bring one header along. Adds the header row (Store, Region, Sales) on top. |
| =SORT(VSTACK(A2:C5,E2:G6),3,-1) | spills 9 × 3Different result | Sort the combined table, here by sales, highest first. Sorted by sales: Miami first, Denver last. |
Common mistakes
- Tables of different widths are padded with #N/A in the narrower one's missing columns. Make the ranges the same width, or wrap the result in IFNA(…,"").
- Ranges that run past the data bring empty rows along, shown as zeros. Filter them out:
=LET(t,VSTACK(A2:C20,E2:G20),FILTER(t,CHOOSECOLS(t,1)<>"")).
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Stack two tables on top of each other
I2, combine the two store tables, A2:C5 and E2:G6, into one table, first table on top.Questions
How do I stack the same range from several sheets?
Use a 3D reference: =VSTACK(Jan:Mar!A2:C20) stacks A2:C20 from every sheet from Jan to Mar.
How do I put two tables side by side instead?
Use HSTACK: =HSTACK(A2:C5,E2:G5).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.