The EXPAND function in Excel resizes an array to the exact number of rows and columns you ask for, and fills the new cells with a value you choose. It sounds small, but it solves real problems: report blocks that change size every time the data changes, lists that need an extra column, and stacked arrays full of #N/A.
This guide is the next step in our dynamic array series. It covers the syntax, five practical formulas, the errors you will meet, and how EXPAND works in other spreadsheet apps. A free practice workbook is attached to this post.
EXPAND syntax and arguments
Microsoft’s official EXPAND function reference lists it for Excel for Microsoft 365 (Windows and Mac), Excel for the web, Excel 2024, and Excel 2024 for Mac. Excel 2021 and older return #NAME?.
=EXPAND(array, rows, [columns], [pad_with])
| Argument | Required? | What it does |
|---|---|---|
| array | Yes | The range or array to resize. |
| rows | Yes | Final number of rows. Leave it empty to keep the current row count. |
| columns | No | Final number of columns. Omit or leave empty to keep the current column count. |
| pad_with | No | Value for the new cells. Default is #N/A. Use “” for blanks or 0 for zeros. |
EXPAND can only make an array bigger. If rows or columns is smaller than the source array, Excel returns #VALUE!. To shrink an array, use TAKE and DROP instead.
5 practical EXPAND formulas
All examples use a small sales table in A4:C12 with the columns Rep, Region, and Sales. Rows 5 to 12 hold eight reps across North, South, West, and East.
1. Pad a small range to a fixed grid
=EXPAND(A5:B6, 3, 3, "-")
A5:B6 is 2 rows by 2 columns. The result is a 3 x 3 grid: the original four cells in the top-left corner, with a dash in the five new cells. Without the last argument, those cells would show #N/A.
2. Keep a filtered report at a fixed size
=EXPAND(FILTER(A5:C12, B5:B12="North"), 5, , "")
FILTER returns three North reps today, but that number changes as data changes. Wrapping it in EXPAND always gives a 5-row block, so the totals, borders, or chart below it never move. The two unused rows are blank.
If the filter could return more than five rows, cap it first, or EXPAND will return #VALUE!:
=EXPAND(TAKE(FILTER(A5:C12, B5:B12="North"), 5), 5, , "")
3. Add a column with a default value
=EXPAND(A5:C12, , 4, "Pending")
Leaving rows empty keeps all eight rows. Setting columns to 4 adds one new column, and every new cell says Pending. This is a fast way to add a Status or Notes column to a spilled list without a helper range.
4. Repeat a label for every row
=HSTACK(EXPAND("Q4 2026", ROWS(A5:A12), , "Q4 2026"), A5:A12)
EXPAND turns the single value “Q4 2026” into a column eight rows tall, because the pad value is the same text. HSTACK then places it next to the rep names. ROWS keeps the label column the same height as the list.
5. Insert a blank row after each record
=TOCOL(EXPAND(A5:A12, , 2, ""))
EXPAND adds an empty second column. TOCOL then reads the result row by row, so each name is followed by a blank cell. The output is 16 rows, which is handy for printed lists or sign-off sheets.
Common EXPAND errors and fixes
| Error | Cause | Fix |
|---|---|---|
| #N/A in new cells | pad_with was left out | Add a pad value such as “”, 0, or “-“. |
| #VALUE! | rows or columns is smaller than the array | Use a larger size, or trim with TAKE first. |
| #SPILL! | Cells in the output area are not empty | Clear the range the result needs, or move the formula. |
| #NUM! | The requested array is too large | Lower the rows or columns value. |
| #NAME? | Excel version has no EXPAND | Use Microsoft 365, Excel 2024, or Excel for the web. |
Tip: with HSTACK or VSTACK, arrays of different sizes are padded with #N/A automatically. Wrapping the stack in IFNA(…, “”) hides them; EXPAND gives you the same control on a single array.
EXPAND in Excel, LibreOffice Calc, and Google Sheets
| App | EXPAND support | Notes |
|---|---|---|
| Excel for Microsoft 365 / Excel 2024 | Yes | Spills automatically; comma separators. |
| Excel for the web | Yes | Same syntax as desktop. |
| LibreOffice Calc | Yes, from 25.8 | Semicolon separators: =EXPAND(A5:B6;3;3;”-“) |
| Google Sheets | No EXPAND function | Use MAKEARRAY with INDEX and IFERROR (below). |
| Excel 2021 and older | No | Use IFERROR with INDEX and SEQUENCE (2021). |
The LibreOffice EXPAND help page confirms the function arrived in Calc 25.8 with the same four arguments. In Google Sheets, this formula gives the same result as example 1:
=MAKEARRAY(3, 3, LAMBDA(r, c, IFERROR(INDEX(A5:B6, r, c), "-")))
In Excel 2021, which has SEQUENCE but not EXPAND, use:
=IFERROR(INDEX(A5:B6, SEQUENCE(3), SEQUENCE(1, 3)), "-")
Practice workbook
Download the companion workbook from the button on this page. The Practice sheet has the sales table and seven tasks with yellow answer cells. The Solutions sheet has every working formula, including the #VALUE! example. Open it in Excel for Microsoft 365, Excel 2024, or Excel for the web.
FAQ
Can EXPAND make an array smaller?
No. A smaller rows or columns value returns #VALUE!. Use TAKE, DROP, CHOOSEROWS, or CHOOSECOLS to reduce an array.
How do I pad with blank cells instead of #N/A?
Set pad_with to an empty string: =EXPAND(A5:B6, 3, 3, ""). The cells look blank, but they contain empty text, so ISBLANK returns FALSE.
Can I expand only the columns?
Yes. Leave rows empty and supply columns, for example =EXPAND(A5:C12, , 4).
Does EXPAND work in Google Sheets?
Not as of November 2026. Google Sheets has no EXPAND function, so use the MAKEARRAY formula shown above.
Download the practice workbook
The same data as this tutorial, with empty answer cells and a Solutions sheet.