WRAPROWS and WRAPCOLS in Excel: Turn Any 1D List Into a Clean 2D Table

Isometric spreadsheet illustration showing WRAPROWS in Excel folding a single list into a 2D table

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?.

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:

FeatureWRAPROWSWRAPCOLS
Fill DirectionLeft to right across rowsTop to bottom down columns
wrap_count ControlsNumber of columns (width)Number of rows (height)
Default Padding#N/A#N/A
Custom Padding=WRAPROWS(A6:A15, 3, "-")=WRAPCOLS(A6:A15, 4, "")
Best ForSeating grids, card layoutsMulti-column print lists

Troubleshooting #VALUE!, #NUM!, #N/A, and #SPILL! Errors

  • #VALUE! error: Per Microsoft Support, Excel returns #VALUE! if vector is a 2D range (more than one row AND more than one column). Flatten 2D ranges first with TOCOL(range, 1) before wrapping.
  • #NUM! error: Returned when wrap_count is less than 1. Always pass a positive integer.
  • #N/A errors in trailing cells: Occurs when the source count isn’t divisible by wrap_count and pad_with is 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 WRAPROWS and WRAPCOLS are not supported.

Frequently Asked Questions

Download the practice workbook

The same data as this tutorial, with empty answer cells and a Solutions sheet.

Team Xl in Excel

Team Xl in Excel

Spreadsheet Architect & Educator at Xl in Excel. Sharing advanced formulas, dynamic arrays, and clean data modeling techniques.

Learn More About Team Xl in Excel →

Leave a Reply

Your email address will not be published. Required fields are marked *

Zoom: 100% | UTF-8 | Xl in Excel