FormulaCraft

HSTACK

HSTACK places arrays side by side horizontally, appending each subsequent array to the right of the previous one to form a single wider array. All arrays must have the same number of rows, or missing cells are filled with errors. It is an Excel 365 and Google Sheets dynamic array function useful for merging columns from different ranges.

Excel
=HSTACK(A2:A4,C2:C4)
Google Sheets
=HSTACK(A2:A4,C2:C4)

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1A2:A4 is the first column array — it forms the left portion of the combined result.
  2. 2C2:C4 is the second column array — it is placed directly to the right of the first.
  3. 3Both ranges must have the same row count (3 here); add more arrays for additional columns.

Need a version for your data?

Try: “Merge two separate columns from my sheet into a single side-by-side array

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: