Sum top n values

Related Functions

Sponsored Link

To sum the top values in a range, you can use a formula based on the LARGE function, wrapped inside the SUMPRODUCT function. In the generic form of the formula (above), rng represents a range of cells that contain numeric values and N represents the idea of Nth value.

Will return the 1st, 2nd, and 3rd largest value in the range B4:B13. In the example above, where B4:B13 contains the numbers 1-10, the result from LARGE will be the array {8,9,10}. SUMPRODUCT then sums the numbers in this array and returns a total, which is 27.

Using SUMPRODUCT avoids the complexity of entering an array formula, but it is still processing arrays. You can also write an array formula directly using SUM:

When N becomes large it becomes tedious to create the array constant by hand - If you want to sum to the top 20 or 30 values in a large list, typing out an array constant with 20 or 30 items will take a long time. In this case, you can use a shortcut for building the array constant that uses the ROW and INDIRECT functions.

For example, if you want to SUM the top 20 values in a range called "rng" you can write a formula like this: