ExcelFlux

WRAPCOLS function

Wraps the provided row or column of values by columns after a specified number of elements.

Lookup and reference · Excel 2024+

Where can you use it?

Reporting and operations teams. Use functions in this group to retrieve a field from an item, employee or order list, select the right record, or move values into another report.

Scenario in the workbook

Wrap a vector into columns of three items; the sample fills one column.

A worked example from the workbook

RowAB
6InputSecond input
7101
8202
9303
Record 1
=INDEX(WRAPCOLS($A$7:$A$9,3),B7,1)

Expected result10

See the inputs and instructions for all 3 examples

Syntax

WRAPCOLS(vector, wrap_count, [pad_with])

Copyable formulas

English Excel · en-US
=INDEX(WRAPCOLS($A$7:$A$9,3),B7,1)
Turkish Excel · tr-TR
=İNDİS(SÜTUNSAR($A$7:$A$9;3);B7;1)

Worked examples

Wrap a vector into columns of three items; the sample fills one column.

Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.

Row A B
6 Input Second input
7 10 1
8 20 2
9 30 3
Case Formula Expected result
Record 1 =INDEX(WRAPCOLS($A$7:$A$9,3),B7,1) 10
Record 2 =INDEX(WRAPCOLS($A$7:$A$9,3),B8,1) 20
Record 3 =INDEX(WRAPCOLS($A$7:$A$9,3),B9,1) 30
Microsoft Excel reference