# EXPAND Function

> Expand an array to a number of rows and columns with the EXPAND formula function of TX Sheet Control: rows, columns, pad_with, the #VALUE! error and an example.

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

---

Expand an array to a number of rows and columns. `rows` and `columns` are the size of the result, the size of `array` when omitted, and `pad_with` fills the new cells, `#N/A` when omitted. A size smaller than the array returns `#VALUE!`.

### Syntax

```text
EXPAND(array, rows, columns, pad_with)
```

Category: Lookup. Minimum arguments: 2. Maximum arguments: 4.

Available for supported offline calculation.

### Examples

```text
=EXPAND({1,2},2,3,0)
```

The formula returns the 2 × 3 array {1,2,0;0,0,0}.

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:** [EXP Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/exp/llms-full.txt)
- **Next:** [EXPON.DIST Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/expon-dist/llms-full.txt)
