1. Home
  2. Functions
  3. Array
  4. WRAPCOLS

WRAPCOLS function

Wraps a row or column of values into columns of the given length.

Syntax

=WRAPCOLS(vector, wrap_count, [pad_with])

Arguments

ArgumentRequiredDescription
vectorRequiredA single row or column
wrap_countRequiredValues per column
pad_withOptionalThe value for leftover cells (default #N/A)

How to use WRAPCOLS

When WRAPCOLS returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

WRAPCOLS takes 2 required arguments and 1 optional argument. Type =WRAPCOLS( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=WRAPCOLS({1,2,3,4}, 2)Result 2 by 2 array
Spilled result
AB
113
224
=WRAPCOLS({1,2,3}, 2)Result 2 by 2 array
Spilled result
AB
113
22#N/A

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.