ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   date calculations (https://www.excelbanter.com/excel-discussion-misc-queries/64444-date-calculations.html)

kraway

date calculations
 
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?

Peo Sjoblom

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?





All times are GMT +1. The time now is 08:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com