WorksheetFunction.Rank_Avg method (Excel)
Returns the rank of a number in a list of numbers; that is, its size relative to other values in the list. If more than one value has the same rank, the average rank is returned.
Syntax
expression.Rank_Avg (Arg1, Arg2, Arg3)
expression A variable that represents a WorksheetFunction object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Arg1 | Required | Double | Number - The number whose rank you want to find. |
Arg2 | Required | Range | Ref - An array of, or a reference to, a list of numbers. Non-numeric values in reference are ignored. |
Arg3 | Optional | Variant | Order - A number that specifies how to rank number. If the order is 0 (zero) or omitted, Microsoft Excel ranks the number as if the reference were a list sorted in descending order. If the order is any non-zero value, Excel ranks number as if the reference were a list sorted in ascending order. |
Return value
Double
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.