Name
range.Sort([Key1
]), [Order1
], [Key2
], [Type
], [Order2
], [Key3
], [Order3
], [Header
], [OrderCustom
], [MatchCase
], [Orientation
], [SortMethod
], [DataOption1
], [DataOption2
], [DataOption3
])
Synopsis
Sorts the current active region or a specific range of cells using the specified range, which must be a single cell.
Argument |
Settings |
---|---|
|
The first row or column to sort. Can be either a single cell range or heading text. |
|
|
|
The second row or column to sort. |
|
Specifies which elements should be sorted if you are sorting a PivotTable report. |
|
Same as |
|
The third row or column to sort. |
|
Same as |
|
Specifies whether the first row or column contains header information. |
|
The index of a custom sort order from the Sort Options dialog box. |
|
True to perform a case-sensitive search. |
|
|
|
For non-English sorts, |
|
|
|
|
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.