Google Sheets HSTACK: Combine Tables Horizontally Side-by-Side
HSTACK appends arrays and ranges horizontally side-by-side in sequence, merging columns from separate sources into a single unified table.
=HSTACK(array1, [array2, ...])Formula Parameters & Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
| array1 | Range | Required | Primary table range. |
| array2 | Range | Optional | Secondary range placed to the right of array1. |
Real-World Spreadsheet Examples
Explore verified operational formulas used in enterprise reporting and database workflows:
Example 1: Merge Client Names with Automated Score Calculations
=HSTACK(A2:B100, MAP(C2:C100, D2:D100, LAMBDA(s, c, s*c)))Example 2: Stitch Non-Adjacent Columns from Master Sheet
=HSTACK(Sheet1!A:A, Sheet1!G:G, Sheet1!Z:Z)Example 3: Join Dates with Daily FX Rates
=HSTACK(A2:A30, GOOGLEFINANCE("CURRENCY:EURUSD", "price", DATE(2026,1,1), 30))Common Errors & Solutions
Performance Pro Tips
- Combine with CHOOSEROWS to align table headers cleanly.
Frequently Asked Questions
Does HSTACK recalculate automatically when data changes?
Yes. Google Sheets recalculates all dependent formulas immediately whenever referenced input cells are modified.
Is this formula compatible with Microsoft Excel?
Modern functions like XLOOKUP, FILTER, UNIQUE, SORT, and LET are natively supported in Excel 365. However, QUERY is unique to Google Sheets and uses the Google Visualization API syntax.
Related Google Sheets Formulas
QUERY
The QUERY function is Google Sheets' most versatile formula, executing a SQL-like Google Visualization API Query Language string across spreadsheet tables to filter, aggregate, group, pivot, and sort data in a single formula.
Data TransformationARRAYFORMULA
ARRAYFORMULA enables single spreadsheet formulas to output an entire matrix or column of calculated results automatically. When new rows are entered, ARRAYFORMULA calculates them instantly without requiring manual formula dragging.
Data TransformationFILTER
FILTER dynamically outputs only the rows or columns from a source range that satisfy one or more logical conditions. As source data updates, filtered results re-calculate automatically.