1. Combine ticket ID with priority
| ID | Priority |
| T001 | High |
| T002 | Medium |
| T003 | Low |
| T004 | High |
| T005 | Medium |
=HSTACK(A2:A6, B2:B6)
Result: A 5×2 array: T001|High, T002|Medium, T003|Low, T004|High, T005|Medium
HSTACK takes the ID column and Priority column and places them side by side in a single output array, preserving all 5 rows without modifying the original data. The result is a rectangular array ready for reporting or further processing.
2. Merge ticket ID, agent, and satisfaction score
| ID | Agent | CSAT |
| T001 | Alice | 5 |
| T002 | Bob | 4 |
| T003 | Alice | 5 |
| T004 | Carol | 3 |
| T005 | Bob | 4 |
=HSTACK(A2:A6, E2:E6, F2:F6)
Result: A 5×3 array: T001|Alice|5, T002|Bob|4, T003|Alice|5, T004|Carol|3, T005|Bob|4
HSTACK combines three columns (A, E, F) that are scattered throughout the spreadsheet, pulling them together into one consolidated array. Non-adjacent columns are handled identically to adjacent ones—the function simply takes each array in order and places it to the right of the previous one.
3. Add a calculated resolution time column
| ID | Opened | Closed |
| T001 | 2026-01-15 | 2026-01-16 |
| T002 | 2026-01-15 | 2026-01-18 |
| T003 | 2026-01-16 | 2026-01-17 |
| T004 | 2026-01-16 | 2026-01-20 |
| T005 | 2026-01-17 | 2026-01-19 |
=HSTACK(A2:A6, DAYS(D2:D6, C2:C6))
Result: A 5×2 array: T001|1, T002|3, T003|1, T004|4, T005|2
HSTACK combines ticket IDs with a calculated field created by the DAYS function, which computes the duration between opened and closed dates for each row. The result dynamically shows each ticket alongside its resolution time in days, all merged into one rectangular output.