Excel WRAPCOLS function

Function              WRAPECOLS

Description        Excel WRAPCOLS function Wraps the provided row or column of values by columns after a specified number of elements to form a new array.

Syntax  WRAPCOLS(vector, wrap_count, [pad_with])

vector     The array or range to wrap.

wrap_count       Max values in each column.

pad_with      [optional] Value to use for unfilled places.

Example:

The random values in the A1:K1 range are vector

wrap_count is 4, so each column has 4 values

pad_with is “KK”, so the remaining cells are padded with “KK” instead of #N/A error.

Note:

Excel returns a #VALUE when vector is not a one-dimensional array.

Excel returns a #NUM! when wrap_count is less than 1.

Excel returns a #N/A error for each cell in the return array that has no results.