HSTACK Function in Excel: Put Arrays Side by Side

⏱ 1 min readUpdated 28 September 2026

Dynamic ArrayLevel: ExpertAvailable in: Excel 365 / 2021+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Related functions

HSTACK joins arrays horizontally — build a small report from separate results in one formula.

Syntax

=HSTACK(array1, [array2], ...)
Argument What it means
array1… Arrays to place next to each other.

Examples

Example 1

=HSTACK(UNIQUE(B2:B500), SUMIFS(E2:E500, B2:B500, UNIQUE(B2:B500)))

Each region with its total.

VSTACK · UNIQUE

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong