WorksheetFunction.PercentRank Method

Returns the rank of a value in a data set as a percentage of the data set. This function can be used to evaluate the relative standing of a value within a data set. For example, you can use PercentRank to evaluate the standing of an aptitude test score among all scores for the test.

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

Syntax

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

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

Parameters

  • Arg1
    Type: System.Object

    Array - the array or range of data with numeric values that defines relative standing.

  • Arg2
    Type: System.Double

    X - the value for which you want to know the rank.

  • Arg3
    Type: System.Object

    Significance - an optional value that identifies the number of significant digits for the returned percentage value. If omitted, PercentRank uses three digits (0.xxx).

Return Value

Type: System.Double

Remarks

Important

This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. This function is still available for compatibility with earlier versions of Excel. However, if backward compatibility is not required, you should consider using the new functions from now on, because they more accurately describe their functionality. For more information about the new functions, see the PercentRank_Inc(Object, Double, Object) and PercentRank_Exc(Object, Double, Object) methods.

If array is empty, PercentRank returns the #NUM! error value.

If significance < 1, PercentRank returns the #NUM! error value.

If x does not match one of the values in array, PercentRank interpolates to return the correct percentage rank.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace