ReferenceFunctionsLookup Functions
HSTACK
HSTACK: Concatenates arrays horizontally into a single spilled array.
Summary
HSTACK appends columns from each argument left-to-right.
Remarks
- All non-empty range arguments must have the same row count.
- Scalar arguments are treated as 1x1 values.
- Mismatched row counts return
#VALUE!. - Empty inputs are skipped; if all inputs are empty, result is an empty spill.
Examples
Join two 2-row ranges side by side
Grid
| Cell | Value | |
|---|---|---|
Formula
=
Result
Not evaluated yet.
Expected
[[1,10],[2,20]]
Append a scalar column
Grid
| Cell | Value | |
|---|---|---|
Formula
=
Result
Not evaluated yet.
Expected
[["Item","OK"]]
Related functions
FAQ
Why does HSTACK return #VALUE! when combining ranges?
All non-empty inputs must have identical row counts; mismatched heights produce #VALUE!.
How are scalar arguments treated in HSTACK?
Each scalar is treated as a 1x1 block, so it only aligns with other arguments when the target row count is 1.
Runtime metadata
Category
Lookup
Signature
HSTACK(arg1…: Range | Any (Range))This function accepts a repeating argument pattern (min args: 1).
Arity
min 1, max variadic
Arguments
arg1repeating 1Range | Any · Range
Caps
PURE
Source