date calculations

K

kraway

I am trying to calculate the average and median of a value in column I when
the date in column H has a month value of January. This is my formula:
{=AVERAGE(IF(MONTH(H$4:H$1494)=1,I$4:I$1494))}.
Any idea why I get the wrong result?
 
P

Peo Sjoblom

Blank cells would return TRUE for MONTH = 1 as well, you can use

=AVERAGE(IF((Range1<>"")*(MONTH(Range1)=1),Range2))
 
Top