# HSTACK Function

> Combine arrays and ranges side by side with the HSTACK formula function of TX Sheet Control: padding with #N/A, the spilled result and an example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > HSTACK Function
- **179 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hstack/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hstack/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hstack/llms-full.txt

---

Combine arrays horizontally into one array. `array1`, `array2` and up to 255 arrays or ranges are placed side by side; an array with fewer rows than the highest is padded with `#N/A`. The result spills.

### Syntax

```text
HSTACK(array1, array2)
```

Category: Lookup. Minimum arguments: 1. Maximum arguments: 255.

Available for supported offline calculation.

### Examples

```text
=HSTACK({1,2},{3,4})
```

The formula spills 1, 2, 3 and 4 in one row.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [HOUR Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hour/llms-full.txt)
- **Next:** [HYPERLINK Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hyperlink/llms-full.txt)
