WD.ARRANGECOLUMNS
Description
Creates a new range from an existing range, with the columns ordered according to the
specified indexes. You can add an empty column by including a null index value.
Example:
=WD.ARRANGECOLUMNS([range],1,2,3,,4)
inserts a blank
column between the 3rd index value and 4th index value.
Syntax
WD.ARRANGECOLUMNS(
range
,
column_indexes
, ...)
- range: The range to create the new range from.
- column_indexes: The column indexes. The indexes must be in the range of 1 to the number of columns in the range.
Example
The example is based on this range:
A | B | |
|---|---|---|
1
| 4 | 3 |
2
| 8 | 9 |
3
| 14 | 11 |
The formula =WD.ARRANGECOLUMNS(A1:B3,1,1,2,2) in cell A5 has these results:
A | B | C | D | |
|---|---|---|---|---|
5
| 4 | 4 | 3 | 3 |
6
| 8 | 8 | 9 | 9 |
7
| 14 | 14 | 11 | 11 |
Notes
- The index values can repeat, if desired, and can be in any order.
- This function is intended for use in array formulas.