Expands or pads an array to a specified number of rows and columns.
Syntax
EXPAND(array, rows, [columns], [pad_with])Arguments
arrayrequired
The array to be expanded.
rowsrequired
The number of rows in the resulting array.
columnsoptional
The number of columns in the resulting array.
pad_withoptional
The value to use for padding; defaults to #N/A.
The EXPAND function increases the dimensions of an existing array by adding new rows or columns. If the specified dimensions are larger than the original array, the function fills the extra space with a value you define or the #N/A error by default.
=EXPAND({1,2}, 3, 3, 0)→{1, 2, 0; 0, 0, 0; 0, 0, 0}Expands a 1x2 array into a 3x3 array, filling empty cells with 0.
Select the target cell
Click on the cell where you want the expanded array to begin.
Enter the formula
Type =EXPAND( and select your source array, then specify the desired total rows and columns.
The function will return a #VALUE! error because it cannot shrink the array.