# EXPAND

## Content

This function expands or pads an array to the specified row and column dimensions.

## Syntax

`EXPAND(array, rows, [columns], [pad\_with])`

## Argument

The function provides the following arguments.

| Argument | Description |
| -------- | ----------- |
| *array* | The array to expand. |
| *rows* | The number of rows in the expanded array. If missing, rows will not be expanded. |
| *columns* | [Optional] The number of columns in the expanded array. If missing, columns will not be expanded. |
| *pad\_with* | [Optional] The value with which to pad. The default is #N/A. |

## Data Types

The function returns an array, <span style="color: rgb(23, 43, 77); font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: -0.08px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">the type of each value in the array depends on the parameter.</span>

## Remarks

* If rows aren’t provided or are empty, the default value is the number of rows in the array argument.
* If columns aren’t provided or are empty, the default value is the number of columns in the array argument.

## Examples

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