About MrExcel Consulting Services Learn Excel Resources Challenge of the Month MrExcel Seminars Message Board MrExcel Store Podcast Search Contact Home

 Richard asks "mrexcel, I need a formula to add the 9 highest valued cells out of 11 cells. I have a motorcycle racer database set up on Excel 97 and during the series I will count a riders top 9 races (they have to run 8 races to be eligible). Therefore if a rider races 8 races I will just add all 8 races.If a rider races 9 races I will also add all 9 races.If a rider races 10 races I will add 9 races and "drop" there worst race (lowest value).If a rider races all 11 races I will add the highest 9 valued races and "drop" the worst 2. "If your races are in A1:A11, try with this formula=IF(COUNT(A1:A11)<8,0,SUM(A1:A11)-(COUNT(A1:A11)>9)*SMALL(A1:A11,1)-(COUNT(A1:A11)>10)*SMALL(A1:A11,2)) By Juan Pablo Gonzalez on 21-Feb-2002 MrExcel.com Consulting can be hired to implement this concept, or many other cool applications, with your data. MrExcel.com provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures on this web site are provided "as is" and we do not guarantee that they can be used in all situations.

Excel is a registered trademark of the Microsoft® Corporation.

All contents Copyright 1998-2008 by MrExcel Consulting.