# VSTACK in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/vstack/

VSTACK stacks ranges and arrays vertically, in the order you list them. The result spills into the cells below and to the right of the formula. It replaces a long chain of copy and paste when sources live in separate blocks.

## Syntax

```
VSTACK(range1; [range2, …])
```

## Arguments

- `range1` (range, required: yes): The first range or array. It sets the top of the result.
- `range2, …` (range, required: no): More ranges or arrays, appended below in order.

## Examples

The examples use this table, starting in A1:

| Lamp | 5 | Chair | 2 |
|---|---|---|---|
| Desk | 3 | Shelf | 8 |
| Rug | 7 |

```
=VSTACK(A1:B3, C1:D2)
```

Result: 

| Lamp | 5 |
|---|---|
| Desk | 3 |
| Rug | 7 |
| Chair | 2 |
| Shelf | 8 |

Two blocks with two columns each become one list of five rows. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=VSTACK(A1:B3, {"Total", SUM(B1:B3)})
```

Result: 

| Lamp | 5 |
|---|---|
| Desk | 3 |
| Rug | 7 |
| Total | 15 |

A typed array adds a total row under the range. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SUM(VSTACK(B1:B3, D1:D2))
```

Result: `25`

Stack two quantity columns and sum them as one list. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SORT(VSTACK(A1:B3, C1:D2), 2, FALSE)
```

Result: 

| Shelf | 8 |
|---|---|
| Rug | 7 |
| Lamp | 5 |
| Desk | 3 |
| Chair | 2 |

Combine the blocks, then sort by quantity, largest first. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ROWS(VSTACK(A1:B3, C1:D2))
```

Result: `5`

The result has 3 + 2 rows. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- Ranges with different widths are padded: the missing cells of the narrower range show #N/A.
- The result spills, so the cells under and next to the formula must be empty. A value there blocks it with a #REF! error.
- Headers repeat: if every block starts with a header row, the stacked list contains each header. Start the blocks below the headers.
- Blank cells inside a range are not skipped: the stacked list keeps every row.

## Compared with Excel

Excel 365 has VSTACK too. Excel pads a narrower range with #N/A in the same way.

## Related functions

- [HSTACK](https://goingstellar.ro/reference/sheets/hstack/)
- [SORT](https://goingstellar.ro/reference/sheets/sort/)
- [UNIQUE](https://goingstellar.ro/reference/sheets/unique/)
- [QUERY](https://goingstellar.ro/reference/sheets/query/)
- [FILTER](https://goingstellar.ro/reference/sheets/filter/)
- [ARRAYFORMULA](https://goingstellar.ro/reference/sheets/arrayformula/)

## Sources

- [VSTACK (Docs Editors Help)](https://support.google.com/docs/answer/13191461)

