# How to stack two tables on top of each other in Excel

Use VSTACK with both ranges: `=VSTACK(A2:C5,E2:G6)` returns the rows of the first table followed by the rows of the second.

**Excel:** `=VSTACK(A2:C5,E2:G6)` (Excel 2024 and Microsoft 365)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F | G | H | I | J | K |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Store | Region | Sales |  | Store | Region | Sales |  | Store | Region | Sales |
| Austin | South | 48200 |  | Denver | West | 39800 |  |  |  |  |
| Boston | East | 61750 |  | Miami | South | 66400 |  |  |  |  |
| Chicago | North | 57300 |  | Portland | West | 44150 |  |  |  |  |
| Dallas | South | 52900 |  | Seattle | West | 59900 |  |  |  |  |
|  |  |  |  | Tampa | South | 41250 |  |  |  |  |

Formula in I2: `=VSTACK(A2:C5,E2:G6)`

Result (spills 9 × 3): Austin, South, $48,200; Boston, East, $61,750; Chicago, North, $57,300; Dallas, South, $52,900; Denver, West, $39,800; Miami, South, $66,400; Portland, West, $44,150; Seattle, West, $59,900; Tampa, South, $41,250

## 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.

## Other ways

- `=VSTACK(A1:C5,E2:G6)`: 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)`: 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)<>""))`.

## 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)`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/stack-two-tables-on-top-of-each-other
