How to use the WRAPROWS function in Excel

Having trouble with handling large data sets in Excel? Then learn how to use the WRAPROWS function to split them into more manageable rows.

Having trouble with handling large data sets in Excel? Then learn how to use the Excel WRAPROWS function to split them into more manageable rows.

How to use the WRAPROWS function in Excel Picture 1How to use the WRAPROWS function in Excel Picture 1

The WRAPROWS function in Microsoft Excel provides a convenient way to manage and organize data. With this function, users can easily sort data across multiple rows, split them into large datasets, improve readability, and improve the way information appears on the spreadsheet.

This article will show you how to use the WRAPROWS function in Excel with specific examples.

What is the WRAPROWS function in Excel?

The WRAPROWS function works by converting a 1-dimensional array into a two-dimensional array. Simply put, the WRAPROWS function converts values ​​in a row or column into an array of values ​​in individual rows. The number of rows depends on what you specified.

This is a newly released Excel function, and is now available to all Microsoft 365 users, even the entry level can access it.

WRAPROWS function syntax in Excel

=WRAPROWS(vector, wrap_count, [pad_with])

 

This function takes 3 arguments. Now divide each argument of this function:

  1. Vector represents the cell reference or range that you want to include. This data can be displayed in columns and rows.
  2. wrap_count is the maximum number of values ​​for each row.
  3. pad_with is the value you want to add to the row. Excel will use #N/A as the default result if this argument is not specified. This is optional.

How to use the WRAPROWS function in Excel

Let's start from the basic example. Suppose you have a list of numbers from 1 to 20. To use the WRAPROWS function:

1. In the formula bar, write WRAPROWS( .

How to use the WRAPROWS function in Excel Picture 2How to use the WRAPROWS function in Excel Picture 2

2. Select the number range, and then add a comma (,).

3. For wrap_count , write 4 . That means you need to split this number into 4 values ​​per row.

4. Close brackets.

5. Press Enter on the keyboard.

The final syntax will look like this:

=WRAPROWS(B3:B22,4)

How to use the WRAPROWS function in Excel Picture 3How to use the WRAPROWS function in Excel Picture 3

Let's say you want to split it into 3 values ​​per row. In this situation the syntax would be:

=WRAPROWS(B3:B22,3)

How to use the WRAPROWS function in Excel Picture 4How to use the WRAPROWS function in Excel Picture 4

 

However, as you observe, the #N/A error occurs after all the values ​​in your source array have been taken into account. To prevent this, you can use the padding argument instead of the default value. To pad more formulas:

  1. Write WRARPROWS( .
  2. Select the range of numbers, and then add a comma ( , ).
  3. For wrap_count , write 3, then add a comma.
  4. For pad_with , enter the distance. It is represented by '' .
  5. Press Enter on the keyboard.

The final syntax would be:

=WRAPROWS(B3:B22,3," ")

How to use the WRAPROWS function in Excel Picture 5How to use the WRAPROWS function in Excel Picture 5

Note that the space or blank value has been replaced with the #N/A error. It's padding. You can pad any value.

Example using the WRAPROWS function in Excel

Let's say you have two columns in a table. The data table has a column containing the student's name. The other column has a serial number. As a teacher, you want to divide them into teams. You can use WRAPROWS to do this.

  1. Start by writing Teams A, B, C, and D.
  2. In the box below Team A, write WRAPROWS( .
  3. Then select the data range. Here is a list of students.
  4. Add commas.
  5. Write 4 for wrap_count because the example wants to split them into 4 teams.
  6. Close brackets.
  7. Press Enter on the keyboard.

How to use the WRAPROWS function in Excel Picture 6How to use the WRAPROWS function in Excel Picture 6

While WRAPROWS is a great choice for sorting data, sometimes the formula is incorrect. That happens when the data range is not an array or a one-dimensional range. In that case, WRAPROWS will return the #VALUE! error.

The WRAPROWS function is simple but powerful in Excel. By understanding its syntax, you can better organize and edit your data in a flexible and efficient way for your work.

4.5 ★ | 2 Vote