Lookup & reference function

EXPAND function

Enlarges an array to a given number of rows and columns, filling the new cells with a value you choose (or #N/A).

Available in Microsoft 365, Excel 2024, Excel for the web, Excel for Mac 2024+

Excel 2024 and laterNot in Google Sheets

Syntax

EXPAND(array, rows, [columns], [pad_with])
ArgumentWhat it means
arrayRequiredThe range or array to enlarge.
rowsRequiredThe total number of rows wanted. Leave empty to keep the current height. It cannot be smaller than the current height.
columnsOptionalThe total number of columns wanted. Leave empty to keep the current width.
pad_withOptionalThe value to put in the new cells. Without it they show #N/A.

Returns: A larger array containing the original values in the top-left and padding elsewhere.

How EXPAND works

EXPAND makes an array bigger. You say how many rows and columns the result should have, and the original values sit in the top-left corner while the extra cells are filled with pad_with. On its own that is a niche need, but it is very useful when you combine arrays of different sizes: VSTACK and HSTACK need matching widths or heights, and EXPAND can pad the smaller piece first.

The rows and columns are total sizes, not the number to add. If you leave pad_with out, the new cells show #N/A, which is easy to spot while building a formula but usually not what you want in a finished report - pass "" for empty-looking cells or 0 for zeros.

Examples

1Pad to four rows with a dash

D2fx=EXPAND(A2:B3, 4, 2, "-")
ABCDE
1RepSales
2Ana5400Ana5400
3Dev4500Dev4500
4--
5--

The 2-row array becomes 4 rows; the two new rows are filled with dashes.

2Without a pad value

D2fx=EXPAND(A2:B3, 3, 2)
ABCDE
1RepSales
2Ana5400Ana5400
3Dev4500Dev4500
4#N/A#N/A

The extra row shows #N/A because no pad_with was given.

3Add an empty column for notes

D2fx=EXPAND(A2:B3, , 3, "")
ABCDEF
1RepSales
2Ana5400Ana5400
3Dev4500Dev4500

Rows are left as they are, and a third column of empty text is added.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!rows or columns is smaller than the array's current size.Ask for at least the current number of rows and columns.
#N/AThese are padding cells - no pad_with was supplied.Add a fourth argument such as "".

Tips

  • =VSTACK(A1:C1, EXPAND(E2:F5, , 3, "")) stacks a two-column block under a three-column header.
  • Use EXPAND to reserve space in a dashboard so a spilled list always occupies the same rows.

Google Sheets

Use MAKEARRAY with IFERROR(INDEX(array, r, c), pad_with) to pad an array to a larger size.

EXPAND in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechROZBALIT
DanishUDVID
DutchUITBREIDEN
FinnishLAAJENNA
FrenchETENDRE
GermanERWEITERN
HungarianKITERJESZT
ItalianESPANDI
Norwegian (Bokmål)UTVID
PolishROZSZERZ
Portuguese (Brazil)EXPANDIR
RussianРАЗВЕРНУТЬ
SpanishEXPANDIR
SwedishEXPANDERA
TurkishGENİŞLET