Jump to content

Documentation/Calc Functions/LARGE

From The Document Foundation Wiki

Function name:

LARGE

Category:

Statistical Analysis

Summary:

Retrieves the nth largest value in a list of numbers. When used as an array function, it will retrieve an array of values in accordance with the required rank array representing their rank in the list.

Syntax:

LARGE(Data; RankC)

Returns:

Returns the RankC-th largest value in the Data. It can also be an array of real numbers in the order of the required rank array.

Arguments:

Data is an array, or a reference to a range of cells, of data that contains real numbers. For logical values, TRUE is considered as 1, and FALSE as 0 (zero).

RankC is a positive integer value, or a reference to a single cell, or an array of values, or a reference to a range of cells containing them, which is/are the rank(s) of the numbers in Data. If RankC is an array, the function becomes an array function.

  • If Data contains duplicate values, then the function ranks them incrementally. See examples below.
  • If RankC is zero, negative, or larger than the size of Data, then the function returns an error.
  • If RankC contains a non-numeric value, either being passed as an array or as a reference to the cells containing that value, then the function returns an error.
  • If Data contains both non-numeric and numeric values, then the function considers the numeric values first and the non-numeric values last, returning the expected results for the numeric values and an error for the non-numeric data.

Additional details:

In each case an error is returned, the specific error (message) might vary, depending on the version of the software.

Examples:

Data1 Data2 RankC
1 195 200 2
2 151 180 1
3 148 178 3
4 189 165 4
5 183 192 5
6 154 144
Formula Description Returns
=LARGE(A1:B6;2) The second largest value in A1:B6. 195

=LARGE(A1:B6;C1:C5)
=LARGE(A1:B6;{2;1;3;4;5})
Using CSE.

Array of the c-th largest value in A1:B6 with ranks defined in C1:C5. 195
200
192
189
183

Related LibreOffice functions:

RANK

ROUNDUP

SMALL

ODF standard:

Section 6.18.40, part 2

Related (or similar) Excel functions:

LARGE