This function wraps the provided row or column of cells by columns after a specified number of elements to form a new array.

Sample Usage

WRAPCOLS(A1:E1, 2): A WRAPCOLS function that wraps the range with 2 values per column.

WRAPCOLS(A1:E1, 2, “No value”): A WRAPCOLS function that wraps the range with 2 values per column and fills the extra cells with “No value.”

Syntax

WRAPCOLS(range, wrap_count, [pad_with])

  • range: The range to wrap.
  • wrap_count: The maximum number of cells for each column. If the value isn’t a whole number, it’s rounded down to the nearest whole number.
  • [pad_with]: The value with which to fill the extra cells in the range. By default, the WRAPCOLS function fills the extra cells with #N/A.

Examples

Wrap simple data with WRAPCOLS

Example data:

ABCDE
1ABCDE

Example: Input this formula in G1: =WRAPCOLS(A1:E1, 2)

Result:

GHI
1ACE
2BD#N/A

Make a Copy

Wrap data with “No value” as pad with WRAPCOLS

Example data:

ABCDE
1ABCDE

Example: Input this formula in G1: =WRAPCOLS(A1:E1, 2, "No value")

Result:

GHI
1ACE
2BDNo value

Make a Copy

  • WRAPROWS: This function wraps the provided row or column of cells by rows after a specified number of elements to form a new array.