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

WRAPROWS function

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

Syntax

=WRAPROWS(vector, wrap_count, [pad_with])

Arguments

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

How to use WRAPROWS

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

WRAPROWS takes 2 required arguments and 1 optional argument. Type =WRAPROWS( 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.

=WRAPROWS({1,2,3,4}, 2)Result 2 by 2 array
Spilled result
AB
112
234
=WRAPROWS({1,2,3}, 2, 0)Result 2 by 2 array
Spilled result
AB
112
230

Every formula, right in your browser

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