Contact

HSTACK Function in Google Sheets: Syntax, Examples & Compatibility

Array Intermediate Google Sheets

Learn how to place separate ranges side by side to create one wider array in Google Sheets. Includes syntax, two verified-by-reasoning results, troubleshooting and portability notes.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: place separate ranges side by side to create one wider array in Google Sheets. The reproducible examples below use explicit values so the formula’s meaning is testable without a large workbook.

Evidence: The function name and syntax are documented in the linked vendor function reference. Expected outputs were independently reasoned or checked outside the application. These are not native Google Sheets test results. A guide being published here does not certify every software release or file-import scenario.

Availability and version history

  • Introduced: Announced February 1, 2023; rollout paused February 22, resumed March 1, with access scheduled by March 14. These are service rollout dates, not desktop versions. Google release history.
  • Availability: Documented in the rolling Google Sheets service; examples use the web spreadsheet workflow.
  • Checked: October 14, 2026; official HSTACK reference. Documentation check, not a new native test; existing example-verification notes retain their scope.

Syntax and arguments

=HSTACK(array1, [array2], ...)

Supply one or more ranges. The first is required; each additional range is appended to its right.

Best use case: Place separate ranges side by side to create one wider array.

Set up the example sheet

Enter A2=Pen, A3=Pad, C2=12, and C3=5. Keep a two-row by two-column output region clear before entering the formulas.

Enter the formula in an unused cell. For a formula returning several values, leave an unobstructed area where those values can expand. These formulas use comma argument separators in a typical English-language locale; commas or semicolons inside quoted text are data, not argument separators. Adapt the separator if your regional settings require it.

Worked example 1: HSTACK with known input

=HSTACK(A2:A3,C2:C3)

Expected output: two rows: Pen, 12 and Pad, 5.

The left source column is placed beside the right source column.

Worked example 2: a second HSTACK case

=HSTACK(C2:C3,A2:A3)

Expected output: two rows: 12, Pen and 5, Pad.

Reversing the arguments reverses the placement of the source ranges.

Compare both results before replacing literal values or short sample ranges with your own workbook data. For a spilling formula, compare every output cell, not only the top-left result.

Advanced example: assemble three aligned fields

Add E2=East and E3=West to the example sheet. In a separate empty two-row by three-column area, enter:

=HSTACK(A2:A3,C2:C3,E2:E3)

The exact result is Pen, 12, East followed by Pad, 5, West. Each source contributes a column in argument order. This combines positions, not keys: sorting only E2:E3 independently could attach a region to the wrong product. Align records before stacking.

A single input is also valid: =HSTACK(A2:A3) returns the two-row column Pen, Pad. No heading is manufactured; include a heading cell in the source only when you want it in the result.

Practical advice and troubleshooting

When this formula helps: HSTACK is useful for assembling export-ready tables without writing back into the original cells.

Important edge case: The reviewed Google reference illustrates equal-height inputs but does not specify unequal-height padding. These examples use equal heights; verify padding separately before relying on it in a report.

If the result differs, first verify the text-versus-number types of the input cells, the argument separators for your locale, and the range size. For dynamic arrays, inspect occupied cells in the output area. After importing a file, check function names and the destination application’s support as well as the input data.

Compatibility and version considerations

Do not assume formatting or headers are copied into array results. HSTACK combines values and follows spill rules.

Modern dynamic-array Excel and current Google Sheets list HSTACK; it is not a safe choice for Excel 2013.

Function availability and parameter behavior must be judged for the specific application and release; a function documented in one spreadsheet does not automatically work in another.

Editorial verification: Direct function documentation reviewed October 14, 2026. The two example outputs are independently reasoned; no native application run, screenshot, or version-specific output is claimed. Review the editorial testing standards if you require stronger proof before importing a workbook.