# WRAPCOLS Function

> Wrap a row or column of values into columns of a given length with WRAPCOLS 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 > WRAPCOLS Function
- **223 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/wrapcols/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/wrapcols/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/wrapcols/llms-full.txt

---

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

### Syntax

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

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

Available for supported offline calculation.

### Examples

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

The formula returns the array {1,3;2,0}: the columns 1, 2 and 3, 0, where 0 pads the second column.

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:** [WORKDAY.INTL Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/workday-intl/llms-full.txt)
- **Next:** [WRAPROWS Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/wraprows/llms-full.txt)
