1. Home
  2. Functions
  3. Array
  4. EXPAND

EXPAND function

Expands an array to the given number of rows and columns, filling new cells with a pad value.

Syntax

=EXPAND(array, rows, [columns], [pad_with])

Arguments

ArgumentRequiredDescription
arrayRequiredThe range or array
rowsRequiredRows in the result
columnsOptionalColumns in the result
pad_withOptionalThe value for new cells (default #N/A)

How to use EXPAND

When EXPAND returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

EXPAND takes 2 required arguments and 2 optional arguments. Type =EXPAND( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=EXPAND({1,2}, 2)Result 2 by 2 array
Spilled result
AB
112
2#N/A#N/A
=EXPAND({1}, 1, 3, 0)Result 1 by 3 array
Spilled result
ABC
1100
=EXPAND({1;2}, 1)Result #VALUE!

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.