WorksheetFunction.Rank_Avg Method

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.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Rank_Avg ( _
    Arg1 As Double, _
    Arg2 As Range, _
    Arg3 As Object _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Double
Dim Arg2 As Range
Dim Arg3 As Object
Dim returnValue As Double

returnValue = instance.Rank_Avg(Arg1, _
    Arg2, Arg3)
double Rank_Avg(
    double Arg1,
    Range Arg2,
    Object Arg3
)

Parameters

  • Arg1
    Type: System.Double

    Number - The number whose rank you want to find.

  • Arg3
    Type: System.Object

    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 was a list sorted in descending order. If the order is any non-zero value, Microsoft Excel ranks number as if the reference were a list sorted in ascending order.

Return Value

Type: System.Double

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace