Average

  • Thread starter Thread starter Troy
  • Start date Start date
T

Troy

A B C
Jan-01 340 1
Jan-15 210 1
May-04 130 5
May-25 222 5
Aug-17 434 8
Aug-19 110 8

Column A is the date, Column B is the amount to be
averaged, Column C is the numeric month for Column A.
I need to get an average in a range, but only average (for
example) just month 5.
 
A B C
Jan-01 340 1
Jan-15 210 1
May-04 130 5
May-25 222 5
Aug-17 434 8
Aug-19 110 8

Column A is the date, Column B is the amount to be
averaged, Column C is the numeric month for Column A.
I need to get an average in a range, but only average (for
example) just month 5.


=SUMIF(C1:C6,5,B1:B6)/COUNTIF(C1:C6,5)


--ron
 
This does work, but now my only problem is when I have
some months that don't have any values it gives me a
#DIV/0!

Is there any way to fix that?
 
This should help!

=IF(COUNTIF(C1:C6,5)=0,0,SUMIF(C1:C6,5,B1:B6)/COUNTIF(C1:C6,5))
 
Back
Top