Syntax
| Parameter | Description |
|---|---|
| array1 | Parameter of the HSTACK function. |
| [array2 | (Optional.) Parameter of the HSTACK function. |
| ...] | Parameter of the HSTACK function. |
Examples
Combine name and score columns
=HSTACK(A1:A20, D1:D20)
Add a calculated column
=HSTACK(A1:C10, A1:A10*B1:B10)
Combine data from two sources
=HSTACK(Sheet1!A1:B20, Sheet2!A1:C20)
Common Errors
Arrays have different row counts. Shorter arrays are padded with #N/A at the bottom.
The output range is blocked by existing non-empty cells.
Tips
Use HSTACK to assemble exactly the columns you need, from any location, into one view. No intermediate columns required.
HSTACK pads shorter arrays with #N/A at the bottom. If that's a problem, use EXPAND to pad with a specific value first, or ensure arrays have equal row counts.
=CHOOSECOLS(HSTACK(range1, range2), 1, 4, 5) stacks arrays horizontally then picks specific columns from the combined result.
Try HSTACK in Viztab
Import your data and use HSTACK with 370+ other formulas. No signup required.
Open Viztab