# WRAPROWS in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/wraprows/

WRAPROWS takes a single row or column and cuts it into rows of wrap_count values each. It turns a long list into a grid.

## Syntax

```
WRAPROWS(range, wrap_count, [pad_with])
```

## Arguments

- `range` (range, required: yes): A single row or column of values to reshape.
- `wrap_count` (number, required: yes): How many values go on each new row.
- `pad_with` (any, required: no): What fills the last row if values run out. Default is #N/A.

## Examples

The examples use this table, starting in A1:

| 10 |
|---|
| 20 |
| 30 |
| 40 |
| 50 |
| 60 |

```
=WRAPROWS(A1:A6, 2)
```

Result: 

| 10 | 20 |
|---|---|
| 30 | 40 |
| 50 | 60 |

Six values in a column become three rows of two. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=WRAPROWS(A1:A6, 3)
```

Result: 

| 10 | 20 | 30 |
|---|---|---|
| 40 | 50 | 60 |

The same list as two rows of three. Values fill each row left to right. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=WRAPROWS(A1:A5, 2, "-")
```

Result: 

| 10 | 20 |
|---|---|
| 30 | 40 |
| 50 | - |

Five values do not fill the last row, so pad_with supplies a dash. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=WRAPROWS(A1:A5, 2, 0)
```

Result: 

| 10 | 20 |
|---|---|
| 30 | 40 |
| 50 | 0 |

Padding with 0 keeps the block numeric. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=WRAPROWS(TRANSPOSE(A1:A6), 3)
```

Result: 

| 10 | 20 | 30 |
|---|---|---|
| 40 | 50 | 60 |

A row works as input too. Here TRANSPOSE turns the column into a row first. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- If the values do not fill the last row, the free spots show #N/A. Add pad_with, such as "-" or 0, to fill them.
- A wrap_count of 0 returns #NUM!.
- A wrap_count larger than the list returns one row with that many columns, padded with #N/A.

## Compared with Excel

Same syntax in Excel.

## Related functions

- [SEQUENCE](https://goingstellar.ro/reference/sheets/sequence/)
- [TRANSPOSE](https://goingstellar.ro/reference/sheets/transpose/)
- [TOCOL](https://goingstellar.ro/reference/sheets/tocol/)
- [CHOOSEROWS](https://goingstellar.ro/reference/sheets/chooserows/)
- [FLATTEN](https://goingstellar.ro/reference/sheets/flatten/)
- [INDEX](https://goingstellar.ro/reference/sheets/index/)

## Sources

- [WRAPROWS (Docs Editors Help)](https://support.google.com/docs/answer/13184285)

