What it does
VSTACK combines arrays vertically. HSTACK combines arrays horizontally.
Syntax or pattern
=VSTACK(array1, [array2], ...) / =HSTACK(array1, [array2], ...)5 practical examples
Combine monthly tables
Stack January and February tables.
=VSTACK(Jan,Feb)Useful for combining similar tables.
Add header to output
Stack a header row above filtered data.
=VSTACK({"Product","Sales"},FILTER(Sales[[Product]:[Amount]],Sales[Region]=H2))Creates a labeled dynamic output.
Combine columns side by side
Place names and totals beside each other.
=HSTACK(Products[Name],Products[Sales])Useful for compact summaries.
Stack multiple regions
Combine regional tables into one list.
=VSTACK(East,West,North,South)Works when columns align.
Build a summary table
Join labels and calculated values.
=HSTACK({"Total";"Average"},{SUM(B2:B100);AVERAGE(B2:B100)})Creates small report blocks.
Common mistakes to avoid
- Make sure spill ranges have empty space below or beside them.
- Use Excel Tables where possible for expanding source data.
- Older Excel versions may not support all dynamic array functions.
Related Excel examples
FAQ
What is a spill formula?
A spill formula returns multiple cells from one formula entered in a single cell.