Yo!
There's managers for ya. Always making an easy job a huge PITA.
So, yeah, there's a way to do it...provided, of course, your manager doesn't object further.
First off, you need to make the months in A2:A4 date values that Excel can recognize. So rather than October, November, December enter 10/1/14, 11/1/14, 12/1/14. Now use a customer format ("mmmm") to have it display as you have it in your sheet.
Then you can get the average for October with the following equation:
=IFERROR(SUMPRODUCT((A$8:A$182>=A2)*(A$8:A$182<DAT E(YEAR(A2),MONTH(A2)+1,1))*(B$8:B$182))/SUMPRODUCT((A$8:A$182>=A2)*(A$8:A$182<DATE(YEAR(A2 ),MONTH(A2)+1,1))*(B$8:B$182>0)),"")
The IFERROR suppresses an error that the formula will return if there is no data for the month (thus resulting in a divide by zero).
The first SUMPRODUCT sums the times for dates on or after 10/1/14 (the value in A2) and less than 11/1/14 (the value in A3).
The second SUMPRODUCT counts these same times and thus the average is gotten by dividing the first by the second.
This formula can then be copied down for November and December.
|