Excel functions / Dynamic arrays
WRAPCOLS function
Wraps a row or column of values into columns of a set length.
Syntax
=WRAPCOLS(vector, wrap_count, [pad_with])
Arguments
vector: A single row or column of values.wrap_count: How many values in each column.pad_with(optional): What fills the last column if it comes up short (default #N/A).
When to use it
WRAPCOLS turns a single row or column into a grid, filling a column at a time with a set number of values, as a newspaper fills columns.
Examples
Six items, two to a column
A B C D E 1 Item Pen Folder Glue 2 Pen Stapler Tape Ruler 3 Stapler 4 Folder 5 Tape 6 Glue 7 Ruler In C1:
=WRAPCOLS(A2:A7, 2)→ Pen, Folder, Glue; Stapler, Tape, Ruler
Common mistakes
- Rows or columns. WRAPCOLS fills down then across; WRAPROWS fills across then down.
WRAPCOLS in other languages
Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.
- Danish: FOLDKOLONNER
- French: ORGA.COLS
- Portuguese (Brazil): QUEBRARCOLS
- Russian: СВЕРНСТОЛБЦ
Try WRAPCOLS in the playground