# VSTACK function in Excel

> VSTACK stacks ranges on top of each other into one list, such as this month's orders under last month's or one region's reps under another's.

Source: https://spreadsheetpractice.com/functions/vstack · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

## Quick answer

- **What it does:** VSTACK stacks ranges on top of each other into one list, such as this month's orders under last month's or one region's reps under another's.
- **Syntax:** `=VSTACK(array1, [array2], ...)`
- **Most common use:** `=VSTACK(A2:B4,D2:E5)` returns Ana (Both lists in one: East first, then West)
- **Available in:** Excel 2024 and Microsoft 365
- **Category:** [Dynamic array functions](https://spreadsheetpractice.com/functions/category/dynamic-arrays)
- **Returns:** One array with the inputs stacked top to bottom. Narrower inputs are padded with #N/A. It spills.

## What it does

VSTACK stacks ranges on top of each other into one list, such as this month's orders under last month's or one region's reps under another's. Wrap the result in SORT, UNIQUE or FILTER to work with everything as a single table.

## Syntax

`=VSTACK(array1, [array2], ...)`

| Argument | Required? | What it is |
|---|---|---|
| `array1` | Required | The first range or array. |
| `array2` | Optional | The next range to place underneath. Add as many as you need, separated by commas. |

## Examples

Each result was calculated by running the formula on the sample sheet.

| Cell | Formula | Result | What it shows |
|---|---|---|---|
| G2 | `=VSTACK(A2:B4,D2:E5)` | Ana (spills 7 × 2) | Both lists in one: East first, then West |
| J2 | `=SORT(VSTACK(A2:B4,D2:E5),2,-1)` | Lee (spills 7 × 2) | The combined list, sorted by sales |
| M2 | `=UNIQUE(VSTACK(A2:A4,D2:D5))` | Ana (spills 5 × 1) | Each rep once, even those in both regions |

### The sample sheet

Every formula above runs on this data:

|  | A | B | C | D | E | F | G | H | I | J | K | L | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | East rep | Sales |  | West rep | Sales |  | All reps |  |  | By sales |  |  | Distinct reps |
| 2 | Ana | $1,250 |  | Raj | $860 |  | Ana | $1,250 |  | Lee | $2,140 |  | Ana |
| 3 | Lee | $2,140 |  | Kim | $1,980 |  | Lee | $2,140 |  | Kim | $1,980 |  | Lee |
| 4 | Kim | $905 |  | Mo | $1,625 |  | Kim | $905 |  | Mo | $1,625 |  | Kim |
| 5 |  |  |  | Ana | $540 |  | Raj | $860 |  | Ana | $1,250 |  | Raj |
| 6 |  |  |  |  |  |  | Kim | $1,980 |  | Kim | $905 |  | Mo |
| 7 |  |  |  |  |  |  | Mo | $1,625 |  | Raj | $860 |  |  |
| 8 |  |  |  |  |  |  | Ana | $540 |  | Ana | $540 |  |  |

## Common mistakes

| What you see | Why, and how to fix it |
|---|---|
| #N/A in some cells | The ranges have different widths, so the narrower one is padded with #N/A. Stack ranges of the same width, or wrap the result in IFERROR(…,""). |
| Header rows in the middle | Each range included its header. Stack only the data rows and put one header above the formula. |
| #NAME? | VSTACK needs Excel 2024 or Microsoft 365. |

## Tips

- Stack the same range from two sheets: =VSTACK(Jan!A2:C20,Feb!A2:C20).
- Add a header row of your own: =VSTACK(A1:B1,SORT(A2:B20,2,-1)).

## Related functions

- [HSTACK](https://spreadsheetpractice.com/functions/hstack): HSTACK places ranges side by side to build one table, so you can pick columns that aren't next to each other, put them in a new order, or add a calculated column, all in one formula that updates with the source.
- [UNIQUE](https://spreadsheetpractice.com/functions/unique): UNIQUE returns each distinct value in a range once, in the order it first appears.
- [SORT](https://spreadsheetpractice.com/functions/sort): SORT returns a sorted copy of a range, ordered by any column you choose, smallest to largest or the reverse.

## Questions

### How do I combine two lists into one in Excel?

=VSTACK(A2:A10,C2:C10) places the second list under the first. Wrap it in UNIQUE to drop duplicates or SORT to order it.

### What is the difference between VSTACK and HSTACK?

VSTACK puts ranges one under another; HSTACK puts them side by side.

## Practice

A graded VSTACK exercise ("One leaderboard from two teams") is on [the VSTACK page](https://spreadsheetpractice.com/functions/vstack). It is checked instantly, then re-checked on changed data.

Lessons that use VSTACK:

- [Lesson 30: VSTACK & HSTACK](https://spreadsheetpractice.com/learn/vstack-hstack) (Pro)

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
