# WRAPROWS Function

> Wrap a row or column of values into rows of a given length with WRAPROWS in TX Sheet Control: wrap_count, pad_with, #VALUE! errors and an array example.

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

---

Wrap a row or column of values into rows of a given length. `vector` is a single row or column, and `wrap_count` is the number of values in each row. `pad_with` fills the cells left over in the last row (`#N/A` when omitted). A `vector` with more than one row and column, or a `wrap_count` less than 1, returns `#VALUE!`.

### Syntax

```text
WRAPROWS(vector, wrap_count, pad_with)
```

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

Available for supported offline calculation.

### Examples

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

The formula returns the array {1,2;3,0}: the rows 1, 2 and 3, 0, where 0 pads the second 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:** [WRAPCOLS Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/wrapcols/llms-full.txt)
- **Next:** [XIRR Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xirr/llms-full.txt)
