Written by Allen Wyatt (last updated November 18, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365
As you are collecting data for your Excel project, you may have a need to add up the top N number of values in a range or the bottom N number of values. For instance, you may be keeping track of golfing scores and need to add up only the top three scores or the bottom three scores out of a series of scores.
As with most any Excel problem, there are several ways you can go about implementing a solution. For instance, you could sort the scores so that they are in ascending or descending order. You would then have the top or bottom scores in a set place where you could always sum them.
There is an easier way, however. You can use the LARGE and SMALL functions, which do the job very nicely. For instance, say you have the scores in cells C5 through C25. All you need to do is put the following formula in a cell in order to add up the top three scores:
=LARGE(C5:C25,1)+LARGE(C5:C25,2)+LARGE(C5:C25,3)
The function returns the Nth largest value from the specified range. As shown in the formula, the largest, second largest, and third largest values are returned and added together. You can similarly use the SMALL function to sum the three lowest scores:
=SMALL(C5:C25,1)+SMALL(C5:C25,2)+SMALL(C5:C25,3)
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12595) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Adding Up Tops and Bottoms.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
When working with data in Excel, you often need to determine if that data meets criteria that you specify. This tip ...
Discover MoreSuppose you have a worksheet that contains a list of ages and then a count of people who correspond with those ages. You ...
Discover MoreIf you have a special need to find cell values that meet two different criteria, where to start can be daunting. This tip ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-11-19 09:46:12
J. Woolley
Here are alternate versions of the Tip's two formulas:
=SUM(LARGE(C5:C25,{1,2,3}))
=SUM(SMALL(C5:C25,{1,2,3}))
Notice {1,2,3} is an array constant within curly brackets. These formula do NOT require use of Ctrl+Shift+Enter.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments