Excel guide · 6 min read
How to convert one column into multiple columns in Excel
=WRAPROWS(A2:A13,3). It cuts the list into rows of 3 values, so a pasted list of name, phone, email, name, phone, email becomes one row per person. Use WRAPCOLS instead to fill down each column before moving right, and add "" as the third argument so a short last row shows blanks instead of #N/A.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Pasted contacts | Class list | Pasted with gaps | One phone missing | |||
| 2 | Dana Whitfield | Abby | Rosa Mendes | Ali Haddad | |||
| 3 | (555) 201-3344 | Ben | (555) 733-2041 | (555) 270-6612 | |||
| 4 | [email protected] | Chloe | [email protected] | [email protected] | |||
| 5 | Marcus Lee | Dev | Beth Moss | ||||
| 6 | (555) 418-0927 | Emma | Jon Park | [email protected] | |||
| 7 | [email protected] | Finn | (555) 640-5598 | Carl Ito | |||
| 8 | Priya Nair | Grace | [email protected] | (555) 455-9083 | |||
| 9 | (555) 362-7710 | Hugo | [email protected] | ||||
| 10 | [email protected] | Isla | Lena Vogel | ||||
| 11 | Tom Okafor | Jack | (555) 812-3370 | ||||
| 12 | (555) 590-1185 | Kira | [email protected] | ||||
| 13 | [email protected] |
Download this sheet as an Excel practice file (.xlsx)
Records that repeat every 3 rows: WRAPROWS
This is the classic mess: you copy a contact list out of a PDF, an email or a web page, and it lands in a single column. Column A has four clients, each as three cells in a row: name, phone, email. You want a table with one client per row.
WRAPROWS(vector, wrap_count, [pad_with]) takes a one-column (or one-row) list and starts a new row every wrap_count values. Each record here is 3 cells, so the wrap count is 3. To add headers in the same formula, stack a row of labels on top with VSTACK and an array constant.
WRAPROWS, WRAPCOLS and VSTACK are in Excel for Microsoft 365, Excel for the web and Excel 2024. Excel 2021 and older show #NAME?; use the INDEX formula at the end of this page there.
Result: spills 5 rows × 3 columns
| Name | Phone | |
| Dana Whitfield | (555) 201-3344 | [email protected] |
| Marcus Lee | (555) 418-0927 | [email protected] |
| Priya Nair | (555) 362-7710 | [email protected] |
| Tom Okafor | (555) 590-1185 | [email protected] |
A header row and four client rows: Dana Whitfield, (555) 201-3344, [email protected], down to Tom Okafor.
WRAPROWS or WRAPCOLS: fill across or fill down
The two functions differ in which way they fill. WRAPROWS fills across: values 1, 2, 3 go in the first row. WRAPCOLS fills down: values 1, 2, 3 go in the first column. In both, wrap_count is how many values go in each row (WRAPROWS) or each column (WRAPCOLS).
That second point catches people. Column C is a class list of 11 children to print in three columns, reading down. =WRAPCOLS(C2:C12,3) does not give three columns; it gives three rows, with four columns. For WRAPCOLS, the number you pass is the column height. Work it out from the count: ROUNDUP(COUNTA(C2:C12)/3,0) is 4 rows, which gives exactly three columns. The formula keeps working as names are added, if you extend the range.
Records are the other way round: for the contact list, WRAPCOLS(A2:A13,3) puts each client in a column, with names in row 1, phones in row 2 and emails in row 3. Use WRAPROWS for records and WRAPCOLS for newspaper-style columns.
Result: spills 4 rows × 3 columns
| Abby | Emma | Isla |
| Ben | Finn | Jack |
| Chloe | Grace | Kira |
| Dev | Hugo |
Three columns of four: Abby, Ben, Chloe, Dev down the first; Emma to Hugo down the second; Isla, Jack, Kira and a blank down the third.
Hide the #N/A in the last row with pad_with
11 names do not split evenly into rows of 3. The last row has only Jack and Kira, and WRAPROWS fills the gap with #N/A by default. That looks like a broken formula on a printout, and any SUM or MAX over the result returns #N/A too.
The third argument, pad_with, sets what fills the gap. "" leaves it looking empty; 0 or "-" work too. Note that it only fills the gaps at the end. If a cell in the source list is empty, WRAPROWS shows it as 0, not as blank.
Result: spills 4 rows × 3 columns
| Abby | Ben | Chloe |
| Dev | Emma | Finn |
| Grace | Hugo | Isla |
| Jack | Kira |
Four rows of three: Abby, Ben, Chloe / Dev, Emma, Finn / Grace, Hugo, Isla / Jack, Kira and an empty cell instead of #N/A.
Blank separator rows between records
Pasted lists often have an empty row after each record, like column E. Wrap it by 3 and everything after the first blank drifts: the second row starts with a 0 (the blank) and Jon Park's email ends up in the third row. Every record after the first separator is off by one more cell.
If every record is followed by exactly one blank, you can wrap by 4 and drop the last column: =DROP(WRAPROWS(E2:E12,4,""),,-1). Wrap by 4 alone and that fourth column is full of zeros. The safer fix is to remove the blanks first, so the separators do not matter at all.
Result: spills 3 rows × 3 columns
| Rosa Mendes | (555) 733-2041 | [email protected] |
| Jon Park | (555) 640-5598 | [email protected] |
| Lena Vogel | (555) 812-3370 | [email protected] |
Three clean rows: Rosa Mendes, Jon Park and Lena Vogel, each with their phone and email. TOCOL(E2:E12,1) removed the two blank rows before wrapping.
Check that no record is missing a field
The real danger is silent. In column G, Beth Moss has no phone number, so her record is two cells instead of three. WRAPROWS does not know that. Her email lands in the Phone column, Carl Ito lands in the Email column, and his details slide into the next row. No error appears.
Two quick checks catch it. =MOD(COUNTA(G2:G9),3) must be 0 when every record has 3 fields; here it returns 2, because the list has 8 cells. And a test on a column that has a pattern, like the @ in an email, shows where the drift starts. The first FALSE is the first broken record: fix the source list (type the missing phone, or insert an empty cell) and the table rights itself.
Result: spills 3 rows × 1 column
| TRUE |
| FALSE |
| FALSE |
TRUE, FALSE, FALSE: only Ali Haddad's row has an email in the Email column. Beth Moss's row is the first that went wrong.
Excel 2019, 2016 and older: an INDEX formula
Without WRAPROWS, INDEX can pick the right cell for each spot in the table. Type this in the top-left cell of the table, fill it right 3 columns and then down 4 rows. ROWS(A$1:A1) counts the table row and COLUMNS($A1:A1) the table column, so the position in the list is (row - 1) x 3 + column. Change the 3 to the number of fields per record.
Filled down past the last record (row 5 here) it returns #REF!, because position 13 is past the end of a 12-cell list. Empty source cells come back as 0. Once the table is right, copy it and use Paste Special > Values if you want to delete the original column.
Result: Dana Whitfield
Dana Whitfield in the first cell. Filled to the second row and third column it returns [email protected], the 6th value in the list.
Which method to pick, and what this is not
Use WRAPROWS for records (name, phone, email) and WRAPCOLS for a long list printed in columns. Add TOCOL(range,1) inside when the list has blank separator rows, and always run the MOD check before trusting a table of pasted records. Use INDEX in Excel 2021 and older.
The result is a live formula: edit the source and the table changes, and you cannot type over single cells of a spill. Copy it and Paste Special > Values when you need a normal table to sort or edit. If each cell holds several values, like "Dana Whitfield, (555) 201-3344", you are splitting text, not wrapping a list: use TEXTSPLIT or Data > Text to Columns. And if you want one column turned into one row, TRANSPOSE is the function.
Common mistakes
WRAPCOLS gives rows instead of columns
wrap_count is the column height. For 3 columns, pass ROUNDUP(COUNTA(range)/3,0), not 3.
#N/A in the last row
The list does not divide evenly. Add "" as the third argument: WRAPROWS(range,3,"").
Records drift one cell after a blank row
Remove the blanks first with WRAPROWS(TOCOL(range,1),3).
#VALUE! from WRAPROWS
It only accepts one column or one row. =WRAPROWS(A2:B13,3) fails; wrap a single column, or flatten the block with TOCOL first.
FAQ
How do I convert one column into multiple columns in Excel?
In Excel 365 or 2024, use =WRAPROWS(A2:A13,3) to start a new row every 3 values, or WRAPCOLS to fill down each column first. In older Excel, use =INDEX($A$2:$A$13,(ROWS(A$1:A1)-1)*3+COLUMNS($A1:A1)) filled right and down.
How do I convert every 3 rows into one row?
Use =WRAPROWS(A2:A100,3,""). Each group of 3 cells becomes one row. Check first that =MOD(COUNTA(A2:A100),3) is 0, because one missing field shifts every record after it.
How do I split one long list into 3 columns for printing?
Use =WRAPCOLS(A2:A40,ROUNDUP(COUNTA(A2:A40)/3,0),""). The second argument is the number of rows per column, so dividing the count by 3 and rounding up gives exactly three columns.
What is the difference between WRAPROWS and Text to Columns?
WRAPROWS rearranges whole cells from one column into a grid. Text to Columns splits the text inside each cell at a delimiter, such as a comma, into the cells next to it.
Why does WRAPROWS show 0 in some cells?
Those cells are empty in the source list. Remove the blanks with TOCOL(range,1) inside WRAPROWS, or, if the blanks are real empty fields, use WRAPROWS(IF(range="","",range),3,"").
Functions used
WRAPROWSWraps a list into rows, spillsWRAPCOLSWraps a list into columns, spillsVSTACKStacks arrays one under anotherTOCOLTurns a range into one column, spillsDROPRemoves first or last rows, spillsCHOOSECOLSPicks columns, spillsROUNDUPRounds away from zeroCOUNTACounts non-empty cellsMODRemainder after divisionISNUMBERIs it a number?SEARCHPosition of textINDEXValue at a positionROWSNumber of rows in a rangeCOLUMNSNumber of columns in a range
Related guides
- How to transpose rows to columns in Excel
- How to split text by a delimiter in Excel
- How to combine multiple columns into one column in Excel
- How to remove blank rows in Excel
- Sum the last N values in a column
- How to create a unique list in Excel
Updated