# WRAPROWS

## Content

The function wraps the provided row or column of values by rows after a specified number of elements to form a new array.

## Syntax

`=WRAPROWS(vector, wrap\_count, [pad\_with])`

## Arguments

The function has the following arguments:

| Argument | Description |
| -------- | ----------- |
| *vector* | The vector or reference to wrap. |
| *wrap\_count* | The maximum number of values for each row. |
| *pad\_with* | [Optional] The value with which to pad. The default is #N/A. |

## Data Types

The function returns an array, the type of each value in the array depends on the parameter.

## Remarks

The elements of the vector are placed into a 2-dimensional array by row. Each row has wrap\_count elements. The row is padded with pad\_with if there are insufficient elements to fill it. If wrap\_count is greater or equal to the number of elements in vector, then the vector is simply returned as the result of the function.

## Examples

![]()![wraprows-snapshot.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/wraprows-snapshot.04706f.png)