Each subsequent array is appended to the right of the previous array.

The result from HSTACK is asinglearray thatspillsonto the worksheet into multiple cells.

HSTACK works equally well forrangeson a worksheet or in-memoryarrayscreated by a formula.

HSTACK basic example

The output from HSTACK is fully dynamic.

If data in any given array changes, the result from HSTACK will update immediately.

Use HSTACK to combine rangeshorizontallyandVSTACKto combine rangesvertically.

HSTACK basic example

Basic usage

HSTACK stacks ranges or arrayshorizontally.

In the example below, the range B3:D3 is combined with the range B6:C6.

Each subsequent range/array is appended to the right of the previous range/array.

HSTACK basic example

The formula in F3 is:

Ranges may include multiple rows, as seen below.

One option for trapping these errors is to use theIFERROR function.

The result is a “trimmed” range that only includes data from the used portion of the range.

HSTACK basic example

HSTACK basic example

HSTACK basic example 2

HSTACK arrays with ranges

HSTACK with IFERROR

Excel formula: Sum by week

Excel formula: Two-way summary count

Excel formula: Sum by year

Excel formula: 10 most common text values

Excel formula: Mortgage payment schedule

Excel formula: Cash denomination calculator

Excel formula: Minimum value if

Excel formula: Split full name into parts

Excel formula: Sum by week number

Excel formula: Maximum change

Excel formula: Dynamic two-way count

Excel formula: Maximum value if

Excel VSTACK function

Excel TRIMRANGE function

HSTACK basic example

HSTACK with IFERROR