EXPAND Function

Excel Functions › Lookup & Reference

Excel 365 Excel 2024+ Dynamic Array

The Excel EXPAND function grows an array to a size you specify, padding the new cells with a value of your choice. It’s the missing piece when arrays must be a fixed shape — aligning blocks before VSTACK or HSTACK, filling report templates, or squaring off ragged data. One warning up front: leave the pad value out and Excel fills the new cells with #N/A.


Quick answer: to grow a 2×2 block to 4 rows × 3 columns, padding with a dash:
=EXPAND(A1:B2, 4, 3, "-")
The last argument is the pad value. Skip it and every added cell shows #N/A — almost never what you want.

Syntax

=EXPAND(array, rows, [columns], [pad_with])
ArgumentDescription
arrayRequiredThe range or array to grow.
rowsRequiredTotal rows in the result. Must be at least the array’s current row count — EXPAND can’t shrink. Omit to keep the current count.
columnsOptionalTotal columns in the result. Same rule: equal or larger only.
pad_withOptionalThe value for every added cell. Defaults to the #N/A error — supply "", 0, or "-" to get something usable.

Available in: Excel for Microsoft 365, Excel 2024+, and Excel for the web. Older versions show #NAME?. The result is a dynamic array that spills onto the sheet.

Grow an array to a fixed size

Quarterly results so far sit in A1:B2 — two quarters in. The report template needs a fixed 4×3 block, dashes where data hasn’t landed yet:

ABDEF
1Q18,200Q18,200-
2Q29,100Q29,100-
3---
4---
=EXPAND(A1:B2, 4, 3, "-") // spills a 4-row x 3-column block into D1:F4

Note that rows and columns are the total size of the result, not how many to add. And they only go up — to cut an array down, use TAKE or DROP instead.

=EXPAND(A1:B2, 4) // rows only - columns stay at 2

Try it: interactive EXPAND demo

Live demo

Grow the 2×2 quarterly block: set the target size and the pad value — including the trap of leaving pad_with out.

Where EXPAND shines: aligning arrays before stacking

HSTACK and VSTACK pad mismatched arrays with #N/A. EXPAND lets you control that padding by sizing the blocks to match first:

=HSTACK(EXPAND(A1:A5, 8, , ""), B1:B8) // pad the short column with blanks, then stack

Combine with ROWS to make the target size dynamic — “as tall as the other block, whatever that is”:

=EXPAND(A1:A5, ROWS(B1:B20), , 0) // grow to match the height of column B

Or build fixed-size print blocks: a 10-row order form that always reserves space whether 3 lines or 9 are filled:

=EXPAND(FILTER(A2:C50, D2:D50="Open"), 10, 3, "") // open orders, padded to exactly 10 rows

IFNA cleanup: already stuck with #N/A padding from a stack? Wrap it: =IFNA(VSTACK(a, b), "") swaps every padded error for a blank.

Errors & common pitfalls

The big one — omitted pad_with fills with #N/A. =EXPAND(A1:B2, 4, 3) gives you a block whose new cells are all #N/A errors. That poisons downstream SUMs and lookups. Make supplying pad_with a habit: "" for display, 0 for math.

#VALUE! — you tried to shrink. rows and columns must be greater than or equal to the array’s current size. EXPAND only grows; to cut down, use TAKE or DROP.

#SPILL! — the landing zone isn’t empty. The expanded block is bigger than the source by design — make sure the full target size has room to spill.

#NAME? — older Excel. EXPAND requires Microsoft 365 or Excel 2024+. Earlier versions don’t recognize it.

Pitfall: rows/columns are totals, not increments. =EXPAND(A1:B2, 2) adds nothing — the array is already 2 rows tall. To add two rows to a block of unknown size, use ROWS(array)+2.

Practice workbook

📊
Download the free EXPAND practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What does EXPAND pad with if I omit pad_with?
The #N/A error - every added cell shows it. That's the function's biggest gotcha. Supply the 4th argument explicitly: "" for blanks, 0 for numbers, or any label you like.
Can EXPAND make an array smaller?
No. Both size arguments must be at least the array’s current dimensions, or you get #VALUE!. To shrink, use TAKE or DROP.
Are rows and columns in EXPAND the new total size or the amount to add?
The total size of the result. =EXPAND(A1:B2, 4, 3, "") returns a 4x3 array, not a 6x5 one. To add N rows, use ROWS(array)+N as the rows argument.
When would I actually use EXPAND?
Mostly to align array sizes: padding a short column before HSTACK, forcing FILTER results into a fixed-size report block, or reserving template space that fills in as data arrives.
Which Excel versions support EXPAND?
Excel for Microsoft 365, Excel 2024 and later, and Excel for the web. Excel 2021 and earlier show #NAME?.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: TAKE · DROP · VSTACK · HSTACK · TRIMRANGE