View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default date calculations

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

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


--

Regards,

Peo Sjoblom

"kraway" wrote in message
...
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?