Wraps a provided row or column of values into a two-dimensional array by row.
Sintaxis
WRAPROWS(vector, wrap_count, [pad_with])Argumentos
vectorobligatorio
The one-dimensional array or range to wrap.
wrap_countobligatorio
The maximum number of values for each row.
pad_withopcional
The value to use for padding if there are not enough elements to fill the last row.
The WRAPROWS function takes a one-dimensional array or range and reshapes it into a new array with a specified number of columns. If the total number of elements is not perfectly divisible by the wrap count, the remaining cells are filled with the optional pad_with value.
=WRAPROWS({1,2,3,4,5,6}, 2)→{1,2;3,4;5,6}Wraps a 6-element array into 2 columns, resulting in a 3x2 array.
Select the target cell
Click on the cell where you want the reshaped array to begin.
Enter the formula
Type =WRAPROWS( followed by the range, the column count, and optionally the padding value.
If the array cannot be perfectly divided, the function will return an #N/A error for the missing cells.