averaging a range

  • Thread starter Thread starter suprsonic
  • Start date Start date
S

suprsonic

How do I average a range of numbers between two criteria? For instance, I'd
want to average only numbers greater than 5 and less than 15.
 
=(SUMIF(A1:A5,">5")-SUMIF(A1:A5,">=15"))/(COUNTIF(A1:A5,">5")-COUNTIF(A1:A5,">=15"))

In Excel 2007 and later you can use the AVERAGEIFS function
 
If you have Excel 2007, use the Averageifs function, as in:
=AVERAGEIFS(C7:C11,C7:C11,">5",C7:C11,"<15")

Regards,
Fred
 
Back
Top