Attached is better version of my spreadsheet, with the beginnings of the formula I'm trying to create.
This solves most of the problem... however I would like for the range in COUNTIF to be dynamic depending on the corresponding day number.![]()
=IF(((COUNTIF(D1:D24,"-9999"))<=2), (SUMPRODUCT(--($B$1:$B$9000=B1),$D$1:$D$9000)/SUMPRODUCT(--($B$1:$B$9000=B1))), 0)
Bookmarks