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.
Here are some ideas for you
Optional resources that may help if you are learning formulas, building reports, or working in spreadsheets often.
- Excel formula booksSee ideas
Practice formulas with structured examples you can keep beside your desk.
- Excel shortcut guidesSee ideas
Build speed with keyboard shortcuts for selection, formatting and navigation.
- Numeric keypadsSee ideas
Helpful if you enter many numbers on a laptop or compact keyboard.
- External monitorsSee ideas
Useful for viewing large worksheets, formulas and reference tables side by side.
- Desk notebooksSee ideas
Sketch formula logic, report ideas and table structures before building.
- Laptop standsSee ideas
Make long spreadsheet sessions more comfortable and ergonomic.
Some links in this section may be affiliate links. Choose only what is useful for your own work.