Combine multiple ranges side by side into one wide table — without copy-pasting columns.
HSTACK combines two or more ranges by placing them side by side horizontally. The result spills automatically to the right. Use it to build wide tables from separate narrow ranges, or to add calculated columns to a dataset without touching the original.
HSTACK(array1, [array2], ...)| Argument | What it means |
|---|---|
| array1 required | The first range or array. |
| array2, ... optional | Additional ranges to place to the right. Up to 254 arrays. |
=HSTACK(A2:A20, C2:C20)Returns column A and column C side by side as a 2-column table — useful when your data is split across non-adjacent columns.
=HSTACK(A2:C20, A2:A20 * B2:B20)Returns the original 3-column dataset with a 4th column added (column A times column B) — the source data stays untouched.
=HSTACK(
UNIQUE(A2:A100),
SUMIF(A2:A100, UNIQUE(A2:A100), B2:B100),
COUNTIF(A2:A100, UNIQUE(A2:A100))
)Assembles a 3-column summary report: unique categories, total per category, count per category — all from one formula.
=IFERROR(HSTACK(A2:A10, C2:C15), "")Type it in a live spreadsheet, get instant feedback. No videos, no downloads.
Start practising free →