WRAPROWS Function

Excel Functions › Lookup & Reference

Excel 365 Excel 2024+ Dynamic Array

The Excel WRAPROWS function takes a single row or column of values and folds it into a grid, filling row by row at a width you choose. Eight names wrapped at 3 become a 3×3 block. It’s the reshaping tool for name-tag layouts, print sheets, calendars — and the perfect partner for TOCOL.


Quick answer: to fold a flat list into rows of 3:
=WRAPROWS(A2:A9, 3, "")
The third argument fills the leftover cells in the last row — omit it and they show #N/A.

Syntax

=WRAPROWS(vector, wrap_count, [pad_with])
ArgumentDescription
vectorRequiredThe values to wrap — must be a single row or a single column.
wrap_countRequiredHow many values per row — the width of the new grid.
pad_withOptionalWhat to put in the unused cells of the last row. Default is #N/A.

Available in: Excel for Microsoft 365, Excel 2024+, and Excel for the web. Older versions show #NAME?.

Wrap a flat list into a grid

Eight names sit in a single column, A2:A9. One formula in C1 folds them into rows of three — filling left to right, then moving down:

ACDE
1NamesAvaBenCleo
2AvaDanEliFay
3BenGusHana#N/A
4Cleo
5Dan
6Eli
7Fay
8Gus
9Hana
=WRAPROWS(A2:A9, 3) // 8 names / 3 per row = 3 rows, last cell padded #N/A

Eight values don’t divide evenly by 3, so the final cell gets the default #N/A padding. Supply pad_with to choose something friendlier:

=WRAPROWS(A2:A9, 3, "-") // pads with a dash instead

Try it: interactive WRAPROWS demo

Live demo

Drag the slider to change wrap_count and watch 10 names reflow into a new grid shape — row by row.

The real power: reshape anything via TOCOL + WRAPROWS

WRAPROWS only accepts a one-dimensional vector — but that’s no limit, because TOCOL turns any shape into one. Together they form Excel’s reshape pipeline:

=WRAPROWS(TOCOL(A1:F4, 1), 4, "") // any grid -> clean rows of 4, blanks dropped

Classic uses:

  • Print layouts: fold a 60-name registration list into a 4-wide page for name tags or seating cards.
  • Calendars: wrap a column of 28–31 day numbers at 7 for an instant month grid.
  • Re-flowing imports: a system dumps records as one long column with 5 fields per record? =WRAPROWS(A1:A100, 5) rebuilds the table — one row per record.

Fill down-then-across instead? That’s WRAPCOLS — same arguments, but it fills column by column.

Errors & common pitfalls

#VALUE! — vector isn’t one-dimensional. The first argument must be a single row or single column. To wrap a 2-D range, flatten it first: =WRAPROWS(TOCOL(range, 1), n).

#N/A in the last row. Not a bug — it’s the default padding when the list doesn’t divide evenly by wrap_count. Supply pad_with (even just "") to replace it.

#NUM! — bad wrap_count. wrap_count must be at least 1. Zero or negative values throw #NUM!.

#SPILL! / #NAME? The output grid needs empty cells to land in — and WRAPROWS only exists in Excel 365 / Excel 2024+; older versions show #NAME?.

Pitfall: row-by-row vs column-by-column. WRAPROWS fills across first. If your data should read down each column instead, you want WRAPCOLS — mixing them up scrambles the order.

Practice workbook

📊
Download the free WRAPROWS 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 the pad_with argument do in WRAPROWS?
When the list doesn’t divide evenly by wrap_count, the unused cells in the last row are filled with pad_with. Omit it and they show #N/A.
What's the difference between WRAPROWS and WRAPCOLS?
Fill direction. WRAPROWS fills across each row, then moves down; WRAPCOLS fills down each column, then moves right. In WRAPROWS, wrap_count sets the grid’s width; in WRAPCOLS it sets the height.
Can WRAPROWS wrap a two-dimensional range?
Not directly — a 2-D vector returns #VALUE!. Flatten it first with TOCOL or TOROW: =WRAPROWS(TOCOL(range, 1), n).
Why does my last row show #N/A?
Your list’s length isn’t a multiple of wrap_count, and the default padding is #N/A. Add a third argument: =WRAPROWS(list, 3, "").
Which Excel versions have WRAPROWS?
Excel for Microsoft 365, Excel 2024 and later, and Excel for the web. Older versions 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: WRAPCOLS · TOCOL · VSTACK · INDEX