SortFields.Add Method
Excel Developer Reference |
Creates a new sort field and returns a SortFields object.
Version Information
Version Added: Excel 2007
Syntax
expression.Add(Key, SortOn, Order, CustomOrder, DataOption)
expression A variable that represents a SortFields object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Key | Required | Range | Specifies a key value for the sort. |
SortOn | Optional | Variant | The field to sort on. |
Order | Optional | Variant | Specifies the sort order. |
CustomOrder | Optional | Variant | Specifies if a custom sort order should be used. |
DataOption | Optional | Variant | Specifies the data option. |
Return Value
SortField
See Also