Have you ever exported a long single-column list of names, product SKUs, or monthly values and needed to lay them out into a neat 3-column or 4-column table? Doing it manually with cut-and-paste breaks the moment a new item is added. With WRAPROWS in Excel and its vertical partner WRAPCOLS, you can fold any one-dimensional row or column into a structured 2D grid using a single dynamic formula.
Availability & Compatibility: Per the official WRAPROWS function documentation and WRAPCOLS function documentation, both functions are available in Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel for the web, Excel 2024, and Excel 2024 for Mac (plus Google Sheets). Older perpetual releases such as Excel 2021 and Excel 2019 do not support them and will display #NAME?.
Table of Contents
How WRAPROWS in Excel Works (Fill Across Rows)
WRAPROWS takes a single row or column (a 1D vector) and wraps its items left-to-right across rows, starting a new row after the specified number of elements. Here is the complete syntax:
=WRAPROWS(vector, wrap_count, [pad_with])
- vector (Required): A one-dimensional range or dynamic array (one row or one column) to wrap.
- wrap_count (Required): The maximum number of values per row (how many columns wide your output table will be). Must be at least
1. - pad_with (Optional): The value used to fill any leftover cells if the last row isn’t full. By default, Excel fills missing positions with
#N/A.
Suppose your Practice sheet lists 10 workshop attendees in A6:A15 and you want to arrange them into a three-column seating chart starting in C6. Because 10 items don’t divide evenly by 3, the fourth row will have one attendee and two empty slots. If you omit pad_with:
=WRAPROWS(A6:A15, 3)
Excel returns #N/A in those final two cells. To keep your seating chart clean, pass "-" or "" as the third argument:
=WRAPROWS(A6:A15, 3, "-")
How WRAPCOLS Works (Fill Down Columns)
WRAPCOLS uses the exact same three arguments, but fills top-to-bottom down each column before wrapping to the next column on the right:
=WRAPCOLS(vector, wrap_count, [pad_with])
Here, wrap_count controls the maximum number of items per column (the height of your table). To arrange our 10 attendees into columns of 4 rows each with blank padding:
=WRAPCOLS(A6:A15, 4, "")
You can also chain WRAPROWS or WRAPCOLS with TOCOL and TOROW in Excel to re-grid an existing messy table into a new column count, or wrap output from TEXTSPLIT in Excel when splitting a long delimited string into structured rows.
WRAPROWS vs. WRAPCOLS Quick Reference Table
Use this comparison table to pick the right wrapping direction and padding setup:
| Feature | WRAPROWS | WRAPCOLS |
|---|---|---|
| Fill Direction | Left to right across rows | Top to bottom down columns |
| wrap_count Controls | Number of columns (width) | Number of rows (height) |
| Default Padding | #N/A | #N/A |
| Custom Padding | =WRAPROWS(A6:A15, 3, "-") | =WRAPCOLS(A6:A15, 4, "") |
| Best For | Seating grids, card layouts | Multi-column print lists |
Troubleshooting #VALUE!, #NUM!, #N/A, and #SPILL! Errors
- #VALUE! error: Per Microsoft Support, Excel returns
#VALUE!ifvectoris a 2D range (more than one row AND more than one column). Flatten 2D ranges first withTOCOL(range, 1)before wrapping. - #NUM! error: Returned when
wrap_countis less than1. Always pass a positive integer. - #N/A errors in trailing cells: Occurs when the source count isn’t divisible by
wrap_countandpad_withis omitted. Supply"",0, or"-"as the third argument. - #SPILL! error: Clear any text or merged cells inside the target grid areaβsee our guide on how to fix the #SPILL! error in Excel.
- #NAME? error: The workbook was opened in Excel 2021 or earlier, where
WRAPROWSandWRAPCOLSare not supported.
Frequently Asked Questions
Download the practice workbook
The same data as this tutorial, with empty answer cells and a Solutions sheet.