averaging a range

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.
 
N

Niek Otten

=(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
 
F

Fred Smith

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

Regards,
Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top