Sort.SetRange method (Excel)
Sets the range over which the sort occurs.
Syntax
expression.SetRange (Rng)
expression A variable that represents a Sort object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Rng | Required | Range | Specifies the range over which the sort represented by the Sort object occurs. |
Note
SetRange can only be used when applying a sort to a sheet range, and cannot be used if the range is within a table.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.