LARGE()

Syntax. LARGE(array,k)

Definition. This function returns the largest k-value in a data set. Use this function to select a value based on its relative size. For example, you can use LARGE() to calculate the top three sales in a table.

Arguments

Background. The MIN() and MAX() functions find the smallest or largest value in a cell range, but if you need the second-largest or third-smallest value, use the LARGE() and SMALL() functions.

LARGE() returns the largest values, and SMALL() returns the smallest values from a range.

Note the following:

Examples

Simple Example. The following example explains the formula LARGE(array,k).

If cell range B1:B100 contains your values, LARGE(B1:B100;1) returns the largest value in the array.

Note

The following formula returns the sum of the largest, second-largest, and third-largest value:

=LARGE(B1:B100;1)+LARGE(B1:B100;2)+LARGE(B1:B100;3)

If you use an array formula, you can use a shorter formula:

=SUM(LARGE(B1:B100;{1,2,3}))

After you have entered an array formula, press Ctrl+Shift+Enter. The formula is automatically enclosed in braces.

Although the second formula is shorter than the formula containing the + operator, you have to enter the parameters for all values manually.

Software Company Example. Assume that the software company has a table with the sales of the last two years and wants to know the three highest sales without having to sort the data. The LARGE() function finds and returns the three largest values, as shown in Figure 12-83.

Finding the three largest values in a table.

Figure 12-83. Finding the three largest values in a table.

See Also

PERCENTILE(), PERCENTRANK(), QUARTILE(), SMALL()