WD.ARRANGEROWS
Description
Creates a new range from an existing range, with the rows ordered according to the
specified indexes. You can add an empty row by including a null index value.
Example:
=WD.ARRANGEROWS([range],1,2,3,,4)
inserts a blank
row between the 3rd index value and 4th index value.
Syntax
WD.ARRANGEROWS(
range
,
column_indexes
, ...)
- range: The range to create the new range from.
- column_indexes: The row indexes. The indexes must be in the range of 1 to the number of rows 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.ARRANGEROWS(A1:B3,1,1,2,2,3,3) submitted in cell A5 has these results:
A | B | |
|---|---|---|
5
| 4 | 3 |
6
| 4 | 3 |
7
| 8 | 9 |
8
| 8 | 9 |
9
| 14 | 11 |
10
| 14 | 11 |
Notes
- The index values can repeat, if desired, and can be in any order.
- This function is intended for use in array formulas. You submit array formulas with special keyboard shortcuts. We recommend that you use the unconstrained keyboard shortcut Ctrl+Alt+Enter (on Windows) or Command+Option+Enter (on Mac) so Worksheets can use all the cells it needs for the results. For more information, see Reference: Array Formula Keyboard Shortcuts.