ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dynamic arrays
  3. WRAPROWS and WRAPCOLS in Excel: Turn a List Into a Grid

WRAPROWS and WRAPCOLS in Excel: Turn a List Into a Grid

By ExcelReady Team·Updated November 3, 2026·6 min read

The short answer

WRAPROWS turns a single row or column into a grid with a set number of values per row. Write =WRAPROWS(A2:A13,3) to put 12 names into 4 rows of 3. WRAPCOLS does the same but fills down each column first. Both need Microsoft 365 or Excel 2024, and the optional third argument fills empty cells at the end.

Key takeaways

  • =WRAPROWS(vector, wrap_count, [pad_with]) fills across: wrap_count is how many values go in each row.
  • =WRAPCOLS(vector, wrap_count, [pad_with]) fills down: wrap_count is how many values go in each column.
  • If the list doesn't divide evenly, the last cells show #N/A unless you give a pad_with value such as "".
  • The source must be one row or one column. A two-dimensional range returns #VALUE!.
  • In older Excel, =INDEX(list,(row-1)*cols+col) finds the value for any grid position.
On this page+
  1. What do WRAPROWS and WRAPCOLS do?
  2. How to use WRAPROWS: a step-by-step example
  3. How WRAPCOLS is different
  4. What if the list doesn't divide evenly?
  5. How to sort or filter a list before you wrap it
  6. Common WRAPROWS errors and how to fix them
  7. How to wrap a list in older Excel with INDEX
  8. Practise it

WRAPROWS in Excel takes one long list and wraps it into a grid, a set number of values per row, the way text wraps onto the next line. WRAPCOLS does the same job but fills down each column first. This guide shows the syntax of both, how to handle lists that don't divide evenly, how to sort before you wrap, and what to use if your Excel doesn't have them yet.

What do WRAPROWS and WRAPCOLS do?#

WRAPROWS and WRAPCOLS reshape a one-dimensional list (a single row or column) into a two-dimensional grid. They are dynamic array functions: you type the formula in one cell and the result spills into the cells next to and below it. If dynamic arrays are new to you, read how dynamic arrays and spilling work first.

Excel formula
=WRAPROWS(vector, wrap_count, [pad_with])
=WRAPCOLS(vector, wrap_count, [pad_with])
ArgumentWhat it means
vectorThe list to wrap: one row or one column
wrap_countWRAPROWS: values per row. WRAPCOLS: values per column
pad_withOptional. What to put in empty cells at the end. Default is #N/A

Both functions need Microsoft 365, Excel for the web or Excel 2024. In Excel 2021 or earlier they return #NAME?.

How to use WRAPROWS: a step-by-step example#

To wrap a list into rows, select an empty cell, give WRAPROWS the list and the number of values you want in each row, and press Enter. Say A2:A13 holds twelve names for a seating plan, and you want tables of three:

  1. Click an empty cell with space to the right and below, for example C2.
  2. Type =WRAPROWS(A2:A13,3) and press Enter.

The result spills into C2:E5: four rows of three names. The first row holds names 1 to 3, the second holds names 4 to 6, and so on.

CDE
2AmaraBenChloe
3DevElifFarid
4GraceHiroInes
5JonasKemiLuca

If any cell in C2:E5 already has something in it, you get #SPILL! instead. Clear the cells in the way and the grid appears.

How WRAPCOLS is different#

WRAPCOLS fills down each column before it moves right, so wrap_count sets the number of rows instead of the number of columns. With the same twelve names:

Excel formula
=WRAPCOLS(A2:A13,3)

This gives 3 rows and 4 columns. Column 1 holds Amara, Ben and Chloe. Column 2 holds Dev, Elif and Farid. Use WRAPCOLS when you want people to read down the columns, like a phone list split into newspaper-style columns.

A quick way to remember: WRAPROWS builds full rows of wrap_count values, and WRAPCOLS builds full columns of wrap_count values. If you only need to flip a range on its side, rows to columns, see how to transpose data in Excel instead.

What if the list doesn't divide evenly?#

When the number of values isn't a multiple of wrap_count, the last row or column has gaps, and Excel fills them with #N/A. Ten names wrapped by three leave two empty spots:

Excel formula
=WRAPROWS(A2:A11,3)

The fourth row shows Jonas, #N/A, #N/A. To hide the errors, add the third argument:

Excel formula
=WRAPROWS(A2:A11,3,"")

Now the gaps are empty text. You can pad with anything: 0, "-" or "Spare". The pad value only fills the end of the grid. It never replaces a real blank cell inside the list; a blank inside the list shows as 0.

How to sort or filter a list before you wrap it#

You can wrap the result of another function, so sort first and wrap second. This puts the names in A to Z order across the grid:

Excel formula
=WRAPROWS(SORT(A2:A13),3)

SORT returns the sorted list and WRAPROWS shapes it. The SORT function guide covers sorting descending and by another column. The same idea works with other list functions:

  • A unique list in a grid: =WRAPROWS(SORT(UNIQUE(A2:A40)),4). See how to make a sorted unique list.
  • Random groups: sort the names randomly, then wrap them into teams of four. The guide to randomizing a list shows the random sort.
  • A numbered grid: =WRAPROWS(SEQUENCE(20),5) gives 1 to 20 in four rows of five, although =SEQUENCE(4,5) does that on its own. More in the SEQUENCE function guide.

Common WRAPROWS errors and how to fix them#

Most problems come from the shape of the source or the space for the result.

  1. #VALUE! The vector is more than one row or column, such as A2:B13. Point it at a single column, or stack the table into one column first with TOCOL (Microsoft 365 and Excel 2024).
  2. #NUM! wrap_count is less than 1, for example 0 or a blank cell.
  3. #SPILL! Something blocks the cells where the grid needs to go. Clear them.
  4. #NAME? Your Excel version doesn't have WRAPROWS. Use the INDEX method below.
  5. Gaps show #N/A. Add a pad_with value such as "".

How to wrap a list in older Excel with INDEX#

Without WRAPROWS, you can work out which list position belongs in each grid cell and fetch it with INDEX. In a grid that is cols values wide, row r and column c hold list item number (r - 1) * cols + c. For the 3-wide seating plan, row 2, column 3 is item (2 − 1) × 3 + 3 = 6, which is Farid.

To build the whole grid, put this in the top-left cell and fill it right and down:

Excel formula
=INDEX($A$2:$A$13,(ROW(A1)-1)*3+COLUMN(A1))

ROW(A1) counts 1, 2, 3 as you fill down and COLUMN(A1) counts 1, 2, 3 as you fill right, so each cell picks the right name. The $ signs keep the list fixed. Past the end of the list, INDEX returns #REF!, so wrap the formula in IFERROR(...,"") when the list doesn't divide evenly.

In Microsoft 365, =INDEX(A2:A13,SEQUENCE(4,3)) gives the same grid as WRAPROWS in one formula, because SEQUENCE(4,3) numbers the cells 1 to 12 across each row. For a column-first layout like WRAPCOLS, swap the order inside INDEX to (c - 1) * rows + r.

Practise it#

Try the exercise on this page: it uses the INDEX position rule, so you'll know exactly where each value lands in a wrapped grid. Then practise modern Excel functions like SORTBY and spill references and practise SORT in a live spreadsheet: you type each formula and the sheet checks it instantly.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Imagine =WRAPROWS(A2:A9,3) put these names into a grid 3 names wide. Which name lands in grid row C2 and column D2? Click E2 and type =INDEX(A2:A9,(C2-1)*3+D2), then press Enter.

fx
ABCDEF
1
Name
Grid row
Grid column
Name
2
Amara
2
3
3
Ben
4
Chloe
5
Dev
6
Elif
7
Farid
8
Grace
9
Hiro
10
11
12

Tip: Each full grid row holds 3 names, so row 2 starts after the first 3. Add the column number to get the position in the list.

Practise this in a lesson

LessonModern Excel: XMATCH, SORTBY, TEXTSPLIT and spill references (A2#)Split names with TEXTSPLIT, find positions with XMATCH, sort by another column with SORTBY, and refer to a whole spilled result with A2#.LessonSORT: order data with a formulaSort a table by any column, ascending or descending, and combine SORT with FILTER and UNIQUE.Function guideSORTSort a range with a formula using Excel's SORT. Sort by any column, highest first, or combined with FILTER. Includes a live exercise.

Frequently asked questions

What is the difference between WRAPROWS and WRAPCOLS?

+

Both turn a list into a grid. WRAPROWS fills across each row first, so wrap_count sets the number of columns. WRAPCOLS fills down each column first, so wrap_count sets the number of rows.

Why does WRAPROWS show #N/A?

+

The list doesn't divide evenly by wrap_count, so the last row has empty spots. Excel fills them with #N/A by default. Add a third argument, such as "" or 0, to fill them with something else.

Which Excel versions have WRAPROWS?

+

WRAPROWS and WRAPCOLS are in Microsoft 365, Excel for the web and Excel 2024. Excel 2021 and earlier show #NAME?, so use an INDEX formula there instead.

Can WRAPROWS wrap a table with several columns?

+

No. The first argument must be a single row or a single column, otherwise WRAPROWS returns #VALUE!. Turn the table into one column first, for example with TOCOL in Microsoft 365.

How do I undo WRAPROWS and turn a grid back into a list?

+

Use TOCOL to stack a grid into one column, or TOROW to put it in one row. Both are in Microsoft 365 and Excel 2024. In older Excel, copy each row and paste with Transpose, or use an INDEX formula.

Sources

  • Dynamic array formulas and spilled array behavior - Microsoft Support
  • INDEX function - Microsoft Support
  • SORT function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What do WRAPROWS and WRAPCOLS do?
  2. How to use WRAPROWS: a step-by-step example
  3. How WRAPCOLS is different
  4. What if the list doesn't divide evenly?
  5. How to sort or filter a list before you wrap it
  6. Common WRAPROWS errors and how to fix them
  7. How to wrap a list in older Excel with INDEX
  8. Practise it

Keep reading

Dynamic arrays· 6 min read

TRANSPOSE in Excel: Flip Rows and Columns

To transpose in Excel, copy the range, right-click the destination and choose Paste Special > Transpose. That makes a static copy with rows and columns swapped. For a copy that updates when the original changes, type =TRANSPOSE(A1:E2) in one cell; in Excel 2021 and Microsoft 365 it spills automatically.

Dynamic arrays· 6 min read

The SEQUENCE Function in Excel

SEQUENCE creates a list of numbers that spills into neighbouring cells. =SEQUENCE(10) returns 1 to 10 down a column. The full form is =SEQUENCE(rows, [columns], [start], [step]), so =SEQUENCE(5,1,100,10) gives 100, 110, 120, 130, 140. It works with dates and other functions, and needs Excel 2021, Excel 2024 or Microsoft 365.

Dynamic arrays· 6 min read

Dynamic Arrays in Excel Explained Simply

Dynamic arrays let one Excel formula return several values that spill into the cells below or beside it. Type =UNIQUE(B2:B9) in one cell and the whole list appears, then resizes when the data changes. They need Excel 2021, Excel 2024, Microsoft 365 or Excel for the web. Refer to a whole spill with a # after its first cell, such as E2#.

More on dynamic arrays

  • Auto Number Rows in Excel (SEQUENCE and ROW)
  • Count Unique Values With Criteria in Excel
  • Dynamic Drop-Down Lists in Excel That Update Themselves
  • Sum, Count or Average FILTER Results in Excel
  • FILTER by Date in Excel: Month, Range or Recent
  • How to Filter by a List of Values in Excel
All dynamic arrays articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free