How to use the WRAPROWS function in Excel
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.
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:
- Vector represents the cell reference or range that you want to include. This data can be displayed in columns and rows.
- wrap_count is the maximum number of values for each row.
- 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( .
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)
Let's say you want to split it into 3 values per row. In this situation the syntax would be:
=WRAPROWS(B3:B22,3)
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:
- Write WRARPROWS( .
- Select the range of numbers, and then add a comma ( , ).
- For wrap_count , write 3, then add a comma.
- For pad_with , enter the distance. It is represented by '' .
- Press Enter on the keyboard.
The final syntax would be:
=WRAPROWS(B3:B22,3," ")
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.
- Start by writing Teams A, B, C, and D.
- In the box below Team A, write WRAPROWS( .
- Then select the data range. Here is a list of students.
- Add commas.
- Write 4 for wrap_count because the example wants to split them into 4 teams.
- Close brackets.
- Press Enter on the keyboard.
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.
You should read it
- Basic Excel functions that anyone must know
- How to use Hlookup function on Excel
- How to use the SUM function to calculate totals in Excel
- How to use the LEN function in Excel
- How to use the NPER function in Excel to plan loans and savings
- How to fix the SUM function doesn't add up in Excel
- How to use the MOD function and QUOTIENT function in Excel
- How to use MID functions to get strings in Excel
- How to use COUNTIF function on Excel
- How to use Excel's VALUE function
- How to use the function to delete spaces in Excel
- How to use the IFS function in Excel 2016