Excel functions / Dynamic arrays

WRAPROWS function

Wraps a row or column of values into rows of a set length.

Syntax

=WRAPROWS(vector, wrap_count, [pad_with])

Arguments

When to use it

WRAPROWS turns a single row or column into a grid, filling a row at a time with a set number of values. It lays out a long list in columns that fit a page, or regroups data that came out as one long list.

Examples

  1. Six items, three to a row

    ABCDE
    1ItemPenStaplerFolder
    2PenTapeGlueRuler
    3Stapler
    4Folder
    5Tape
    6Glue
    7Ruler

    In C1: =WRAPROWS(A2:A7, 3) → Pen, Stapler, Folder; Tape, Glue, Ruler

    Try this example

  2. Uneven: the gap filled with a dash

    ABCDE
    1ItemPenStaplerFolder
    2PenTapeGlue-
    3Stapler
    4Folder
    5Tape
    6Glue
    7Ruler

    In C1: =WRAPROWS(A2:A6, 3, "-") → Pen, Stapler, Folder; Tape, Glue, -

    Try this example

Common mistakes

WRAPROWS 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.

Translate a whole formula

Try WRAPROWS in the playground

Related functions