Skip to main content

Excel WRAPROWS function

The WRAPROWS function converts a single row or column into multiple rows (a 2-demensional array) by specifying the number of values in each row.

Note: This function is only available in Excel for Microsoft 365 on the Insider channel.

doc wraprows function 1

Syntax

=WRAPROWS(vector, wrap_count, [pad_with])

Arguments

Vector (required): The array you want to warp into multiple rows.
Wrap_count (required): The maximum number of values for each row.
Pad_with (optional): A specified value to fill cells with no values. By default, #N/A error value will be displayed if there are insufficient elements to fill in.

Remarks

1) The #VALUE! error value occurs if “vector” is not a one-dimensional array (contains more than one column or row);
2) The #NUM! error value occurs if “wrap_count” is less than 1;
3) The #N/A! error value occurs if there are insufficient elements to fill the cells in columns.
4) If "wrap_count" is equal to or greater than the number of cells in the original array, the entire array will be returned in one row.

Return value

It returns an array wrapped by rows.

Example

As shown in the screenshot below, to convert the one-dimensional array in the range B6:B15 into multiple rows, and each row contains at most 2 values, you can apply the WRAPROWS function to get it done.

doc wraprows function 1

Select a blank cell, such as D6 in this case, enter the following formula and press the Enter key to get the columns.

=WRAPROWS(A6:A15,2)

doc wraprows function 1

Notes: If you specify at most 3 values for each row, you will find that there are not enough values to fill the cells in the last row, so, #N/A is displayed.

doc wraprows function 1

To replace the #N/A with a specified value, for example a word “NULL”, you need to specify the argument “pad_with” as “NULL”. See the formula below.

=WRAPROWS(A6:A15,2,"NULL")

doc wraprows function 1


Related Functions

Excel WRAPCOLS function
The WRAPCOLS function converts a single row or column into multiple columns (a 2-demensional array) by specifying the number of values in each column.


The Best Office Productivity Tools


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations