Appends arrays horizontally and in sequence to return a larger array.
Syntax
HSTACK(array1, [array2], ...)Argumente
array1erforderlich
The first array to append.
array2optional
Additional arrays to append.
The HSTACK function combines multiple arrays or ranges by adding them side-by-side. It is particularly useful for merging data sets that share the same number of rows but have different columns.
=HSTACK({1,2}, {3,4})→{1, 2, 3, 4}Combines two horizontal arrays into a single row of four elements.
Select the target cell
Click on the cell where you want the combined data to appear.
Enter the formula
Type =HSTACK( followed by the ranges or arrays you wish to combine, separated by commas.
The function will return a #N/A error for the missing cells in the shorter arrays.