Formualizer Docs

LARGE

Returns the k-th largest value in a data set.

LARGE is useful for top-N analysis, such as highest score, second-highest sale, or third-best result.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=LARGE(array, k)

Arguments

ArgumentTypeRequiredDefault
arraynumber (range)Required—
knumber (range)Required—

Remarks

  • k must be at least 1.
  • Non-numeric values in referenced ranges are ignored.

Error cases

  • Returns #NUM! if k is greater than the count of numeric values.

Examples

Select the second value from the requested end of an unsorted data set.

Formula =LARGE({10,30,20,40},2)

Expected result 30

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Move one position farther into the ordering.

Formula =LARGE({10,30,20,40},3)

Expected result 20

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Select the last valid rank in the four-value array.

Formula =LARGE({10,30,20,40},4)

Expected result 10

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Rank five is outside the size of the source array.

Formula =LARGE({10,30,20,40},5)

Expected result #NUM!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Second-largest from direct values

Formula =LARGE({4,9,1,7},2)

Expected result 7

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Third-largest from a range

Formula =LARGE(A1:A4,3)

Input cells
A
13
212
38
45

Expected result 5

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

When does LARGE return #NUM!?

It returns #NUM! when k < 1, k exceeds numeric count, or no numeric values exist.

Implementation

Engine source

On this page