Syntax
| Parameter | Description |
|---|---|
| array | Parameter of the EXPAND function. |
| rows | Parameter of the EXPAND function. |
| [columns] | (Optional.) Parameter of the EXPAND function. |
| [pad_with] | (Optional.) Parameter of the EXPAND function. |
Examples
Pad a 2x2 to 5x5 with zeros
=EXPAND(A1:B2, 5, 5, 0)
Expand rows only
=EXPAND(A1:C3, 10, 3, "")
Default pad value
=EXPAND(A1:B2, 4, 4)
Common Errors
The target rows or columns is less than the current dimensions of the source array — EXPAND can only grow, not shrink.
The expanded array would overlap existing non-empty cells.
Tips
When stacking arrays of different sizes, EXPAND them to matching dimensions first. This prevents misalignment errors.
Set pad_with to 0 for numeric tables, "" for text, or a specific default value. The default #N/A padding will cause errors in SUM, AVERAGE, etc.
EXPAND only makes arrays larger. To reduce dimensions, use TAKE, DROP, or CHOOSEROWS/CHOOSECOLS instead.
Try EXPAND in Viztab
Import your data and use EXPAND with 370+ other formulas. No signup required.
Open Viztab