Practice free

WRAPCOLS function

WRAPCOLS reshapes a single row or column into a multi-column array of a fixed height, filling top to bottom then left to right. A short last column is padded with #N/A.

Example

Read it as a sentence: wrap the list 1 to 6 into columns of 3, then take the value in row 1, column 2, which gives 4.

Practice this in the app

Syntax

WRAPCOLS(vector, wrap_count, [pad_with])

Arguments in [square brackets] are optional.

vector (required)
A single row or column to reshape.
wrap_count (required)
Maximum items per column.
pad_with (optional)
Fill for leftover cells; default #N/A.

Returns: A multi-column array filled down each column.

One WRAPCOLS formula can fill more than one cell. When the result has several values, they spill into the cells below or to the right of the formula.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=WRAPCOLS({1,2,3,4,5},2) 1 Default pad
=WRAPCOLS({1,2,3,4,5},2,0) 1 Pad 0
=WRAPCOLS({1;2;3;4},2) 1 Column vector
=WRAPCOLS({1,2,3},5) 1 Wrap larger than vector
=WRAPCOLS({1,2;3,4},2) #VALUE! 2D input
=WRAPCOLS({1,2,3},0) #NUM! Wrap 0

Watch out for

  • Input must be one row or one column.
  • Short last column is padded with #N/A.

Where it works

Excel
WRAPCOLS arrived in Excel 2024. Older versions do not have it. 365, Excel for the web and Excel 2024; not in older perpetual versions.
Google Sheets
Same name, same behaviour for everyday use.

Part of Lookup and reference functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .