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 Microsoft 365.
* 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 released in March 2022.
* For the Microsoft documentation refer to support.microsoft.com

 ABCDEF
1=WRAPROWS(C1:C6,2) = {"A","B" ; "C","D" ; "E","F"} ABCD
2=WRAPROWS(C1:C4,2) = {"A","B" ; "C","D"} B   
3=WRAPROWS(C1:C2,2) = {"A","B"} C   
4=WRAPROWS(C1:C2,1) = {"A" ; "B"} D   
5=WRAPROWS(C1:C4,4) = {"A","B","C","D"} E   
6=WRAPROWS(C1:F1,2) = {"A","B" ; "C","D"} F   
7=WRAPROWS(C1:F1,1) = {"A" ; "B" ; "C" ; "D"}     
8=WRAPROWS(C1:D2,1) = #VALUE!     

1 - What is the range (or column-vector) "C1:C6" converted to a 2-dimensional array with 2 columns. This has 3 rows.
2 - What is the range (or column-vector) "C1:C4" converted to a 2-dimensional array with 2 columns. This has 2 rows.
3 - What is the range (or column-vector) "C1:C2" converted to a 2-dimensional array with 2 columns. This has 1 row.
4 - What is the range (or column-vector) "C1:C2" converted to a 2-dimensional array with 1 column. This has 2 rows.
5 - What is the range (or column-vector) "C1:C4" converted to a 2-dimensional array with 4 columns. This has 1 row.
6 - What is the range (or row-vector) "C1:F1" converted to a 2-dimensional array with 2 columns. This has 2 rows.
7 - What is the range (or row-vector) "C1:F1" 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 "C1:D2" converted to a 2-dimensional array with 1 column. The "vector" is not a single column or row.

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