WRAPROWS and WRAPCOLS functions. Sort specified range of cells in a single column or row by a specified number of rows or columns.

01/22/2023

Japanese version.

The WRAPROWS and WRAPCOLS functions are new functions added to Excel in September 2022.
These functions wrap a specified range of cells in a column or row by a specified number of rows or columns.
While the TOROW and TOCOL functions sorted a multi-row/multi-column cell range into a single column/row, this function does the opposite, sorting a single-column/row range into multiple rows/columns.

How it works

=WRAPROWS(vector, wrap_count, pad_with)
=WRAPCOLS(vector, wrap_count, pad_with)
NameOmissionExplanation
vectorRequired argument.
Specify the target cell range.
This cell range must be a single column or row
wrap_countRequired argument.
Specify the number of rows and columns to wrap.
pad_withRequired argument.
Specify the value to be filled in the excess range.

Demonstrate

The first argument is the target cell range, and the second and subsequent arguments are the number of columns and rows to wrap.

In the following example, the green range is the target cell range, the dark blue cells are the cells with formulas, the

yellow is the content of the formula in the dark blue cell, and the light blue cell range is the Spill.

The excess cell range will be #N/A, but the third argument can be used to specify the contents of the range.

Links

Microsoft Excel Functions Lookup & Reference