hi thilag. first thing off, make column J real dates instead of texts. type Nov 2013 in J4. format cells to:
mmmm yy
you uploaded an xlsx file, but your profile says MS off 2003. so which is it? if it's Excel 2007 & above, then this formula works faster:
=AVERAGEIFS(F:F,B:B,">="&J4,B:B,"<="&EOMONTH(J4,0))
in L4:
=AVERAGEIFS(F:F,B:B,"<="&EOMONTH(J4,0))
if you're still using Excel 2003 & below, then:
=SUMPRODUCT(($B$4:$B$20<=EOMONTH(J4,0))*$F$4:$F$20)/SUMPRODUCT(--($B$4:$B$20<=EOMONTH(J4,0)))
Edit: and if you need to round them, simply wrap any of the formulas with ROUND:
=ROUND(formula,2)
Bookmarks