WRAPROWS

WRAPROWS(vector, wrap_count [,pad_with])

Returns the array transformed into multiple rows.

vectorThe vector or reference to wrap
Must be a single column or row.
wrap_countThe maximum number of values in each row.
pad_with(Optional) The value with which to pad.

REMARKS
* This function was added in Excel 2024.
* This function can create a Dynamic Array Formula.
* The elements of the vector are placed into a 2-dimensional array by row and each row has "wrap_count" elements.
* The row is padded with "pad_with" if there are insufficient elements to fill it.
* If "vector" is not a 1-dimensional array, then #VALUE! is returned. Example 8.
* If "wrap_count" is greater or equal to the number of elements in vector, then the vector is simply returned as the result of the function.
* If "pad_with" is left blank, then #N/A is used.
* You can use the TOCOL function to return the array transformed into a single column.
* You can use the TOROW function to return the array transformed into a single row.
* You can use the WRAPCOLS function to return the array transformed into multiple columns.
* This function was first released in March 2022.
* For the Microsoft documentation refer to support.microsoft.com

 ABCDE
1=WRAPROWS(B1:B6,2) = {"A","B" ; "C","D" ; "E","F"}ABCD
2=WRAPROWS(B1:B4,2) = {"A","B" ; "C","D"}B   
3=WRAPROWS(B1:B2,2) = {"A","B"}C   
4=WRAPROWS(B1:B2,1) = {"A" ; "B"}D   
5=WRAPROWS(B1:B4,4) = {"A","B","C","D"}E   
6=WRAPROWS(B1:E1,2) = {"A","B" ; "C","D"}F   
7=WRAPROWS(B1:E1,1) = {"A" ; "B" ; "C" ; "D"}    
8=WRAPROWS(B1:C2,1) = #VALUE!    

1 - What is the range (or column-vector) "B1:B6" converted to a 2-dimensional array with 2 columns. This has 3 rows.
2 - What is the range (or column-vector) "B1:B4" converted to a 2-dimensional array with 2 columns. This has 2 rows.
3 - What is the range (or column-vector) "B1:B2" converted to a 2-dimensional array with 2 columns. This has 1 row.
4 - What is the range (or column-vector) "B1:B2" converted to a 2-dimensional array with 1 column. This has 2 rows.
5 - What is the range (or column-vector) "B1:B4" converted to a 2-dimensional array with 4 columns. This has 1 row.
6 - What is the range (or row-vector) "B1:E1" converted to a 2-dimensional array with 2 columns. This has 2 rows.
7 - What is the range (or row-vector) "B1:E1" converted to a 2-dimensional array with 1 column. This has 4 rows and has transformed the row into a column.
8 - What is the range "B1:C2" converted to a 2-dimensional array with 1 column. The "vector" is not a single column or row.

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top