Calculating A Conditional Average
Category: Formulas | [Item URL]
In the real world, a simple average often isn't adequate for your needs.
For example, an instructor might calculate student grades by averaging a series of test scores but omitting the two lowest scores. Or you might want to compute an average that ignores both the highest and lowest values.
In cases such as these, the AVERAGE function won't do, so you must create a more complex formula. The following Excel formula computes the average of the values contained in a range named "scores," but excludes the highest and lowest values:
=(SUM(scores)-MIN(scores)-MAX(scores))/(COUNT(scores)-2)
Here's an example that calculates an average excluding the two lowest scores:
=(SUM(scores)-MIN(scores)-SMALL(scores,2))/(COUNT(scores)-2)
Excel Tips
Excel has a long history, and it continues to evolve and change. Consequently, the tips provided here do not necessarily apply to all versions of Excel.
In particular, the user interface of the most recent version, Excel 2007, is vastly different from its predecessors. Therefore, the menu commands listed in older tips, will not correspond to the Excel 2007 user interface.
All Tips
Browse Tips by Category
Search for Tips
Tip Books
Needs tips? Here are two books, with nothing but tips:
Contains more than 200 useful tips and tricks for Excel | Other Excel 2003 books | Amazon link: John Walkenbach's Favorite Excel Tips & Tricks
Contains more than 200 useful tips and tricks for Excel 2007 | Other Excel 2007 books | Amazon link: John Walkenbach's Favorite Excel 2007 Tips & Tricks
