WorksheetFunction.Large Method

Returns the k-th largest value in a data set. You can use this function to select a value based on its relative standing. For example, you can use Large to return the highest, runner-up, or third-place score.

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

Syntax

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

returnValue = instance.Large(Arg1, Arg2)
double Large(
    Object Arg1,
    double Arg2
)

Parameters

  • Arg1
    Type: System.Object

    Array - the array or range of data for which you want to determine the k-th largest value.

  • Arg2
    Type: System.Double

    K - the position (from the largest) in the array or cell range of data to return.

Return Value

Type: System.Double

Remarks

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

If k ≤ 0 or if k is greater than the number of data points, Large returns the #NUM! error value.

If n is the number of data points in a range, then LARGE(array,1) returns the largest value, and LARGE(array,n) returns the smallest value.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace