Excel like a finance pro.
HSTACK
Dynamic arrays (Microsoft 365)Set ranges side by side into one wider block — glue separate columns into a single table.
Difficulty
1What is it?
HSTACK joins two or more ranges horizontally — the columns of the first, then the columns of the next — and spills the result as one wider array. It's the companion to VSTACK: where VSTACK adds rows, HSTACK adds columns. Reach for it to assemble a table from columns that live apart — labels here, actuals there, budget somewhere else — into one aligned block, or to bolt a computed column onto an existing range. Microsoft 365.
2What it looks like
HSTACK(array1, [array2], …)- array1
- The first range — it sits on the left.
- [array2], …
- More ranges, placed to the right in order. Shorter ranges are padded with #N/A out to the tallest one.
3When you use it
- Assemble a report from columns that live in different places (labels, actuals, budget).
- Add a calculated column beside a range without inserting it into the source.
- Line two lists up side by side — this year next to last year.
4See it in action
Change the inputs — the formula and result update live. Prefer the real thing? Download the Excel file and open it in Excel.
HSTACK sets ranges beside each other into one wider block — here the Month labels next to the Revenue column. The real win in Excel is combining columns that live apart (labels, actuals, budget) into one table.
=HSTACK(A2:A4, B2:B4)Jan · $80,000| A | B | C | |
|---|---|---|---|
| 1 | Month | Revenue | Result |
| 2 | Jan | $80,000 | Jan · $80,000 |
| 3 | Feb | $88,000 | Feb · $88,000 |
| 4 | Mar | $96,000 | Mar · $96,000 |
The lime cell holds the formula — click it (or any cell) to see its contents in the bar above, just like Excel. Edit the blue cells to watch it recompute.
5Common errors
#N/A paddingThe joined ranges have different heights.Fix: Give every range the same number of rows — shorter ones fill with #N/A otherwise.
#SPILL!Something blocks the cells to the right of the formula.Fix: Clear the spill range.
#NAME?You're on a version without HSTACK.Fix: HSTACK needs Microsoft 365 (2022+).
6Better functions & alternatives
- VSTACK — The vertical sibling — stacks ranges into more rows instead of more columns.
- CHOOSE / INDEX — Older ways to reorder or reassemble columns without HSTACK.
- Power Query — Merge — Join tables by a key column (not just by position) for larger or refreshable data.
Want HSTACK already wired into a model? Wauvel's free tools download as branded, formula-driven Excel.
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →