VSTACK
Stack two or more ranges on top of each other to build one taller array in a single formula.
Spreadsheet editor
Spreadsheet editor
Syntax
=VSTACK(array1, [array2], ...)
Returns: Array Arguments
| Argument | Required | Description |
|---|---|---|
| array1 | Yes | The first range or array to stack. This forms the top block of the combined result. |
| array2, ... | No | Extra ranges or arrays to append below array1, in the order you list them. You can keep adding more, each one stacking under the last. |
About
Use it when your data lives in more than one place and you want it together: monthly sheets you need in one table, a header row you want to sit above a result, or several team lists you want merged for sorting. Because the output is a live array, it updates on its own whenever the source ranges change, so you never have to rebuild the combined list by hand. Pair it with SORT or FILTER to clean up the stacked result, or with UNIQUE to strip out duplicates after merging.
VSTACK works in Microsoft 365, Excel for the web, and Excel 2021 and later. If your ranges have different widths, VSTACK matches the widest one and fills the extra cells with #N/A. To join ranges side by side instead of top to bottom, use its companion HSTACK, and to pull specific columns back out of a stacked array, reach for CHOOSECOLS or TAKE.
Examples
Watch #N/A appear from mismatched widths
Spreadsheet editor
Merge two months, then sort the result
Spreadsheet editor
Stack two lists, then drop duplicates
Spreadsheet editor
Watch out for
#N/A from mismatched widths
When the ranges you stack have different numbers of columns, VSTACK matches the widest one and pads the gaps with #N/A.
→ Make sure every range has the same number of columns, or wrap the formula in IFERROR to swap the #N/A padding for a blank.
Spill range is blocked
VSTACK needs empty cells below the formula to fill. If anything is in the way, you get a #SPILL! error instead of the stacked array.
→ Clear the cells under and beside the formula so the combined result has room to spill.
Not available in older Excel
VSTACK only exists in Microsoft 365 and Excel 2021 and later, so it returns a #NAME? error in Excel 2019 and earlier.
→ On older versions, copy each range below the last by hand, or rebuild the list with helper columns.
Wrong stacking order
VSTACK adds ranges in the exact order you list them, so a header or summary block can end up in the wrong spot.
→ List the range you want on top first, then each block below it in the order it should appear.