Hello,
I suggest to go this route:
Example:
Values in A13
27:
1 1 13 1
1 2 14 1.5
1 3 15 2
1 15 2
15 2
2 4 16 2.5
2 5 17 3
2 6 18 4
2 7 19 5
19 4
3 19 5
3 8 20 6
3 9 21 7
3 10 22 8
22 5.5
Formulas in A13
27:
1 1 =ROW() =IF(ISBLANK(A13),AVERAGE(B$13:B13),AVERAGE(INDEX($B$13:$B
$26,IFERROR(MATCH(C13-4,$C$13:$C$26,0),1)):B13))
1 2 =C13+1-ISBLANK(B14) =IF(ISBLANK(A14),AVERAGE(B$13:B14),AVERAGE
(INDEX($B$13:$B$26,IFERROR(MATCH(C14-4,$C$13:$C$26,0),1)):B14))
1 3 =C14+1-ISBLANK(B15) =IF(ISBLANK(A15),AVERAGE(B$13:B15),AVERAGE
(INDEX($B$13:$B$26,IFERROR(MATCH(C15-4,$C$13:$C$26,0),1)):B15))
1 =C15+1-ISBLANK(B16) =IF(ISBLANK(A16),AVERAGE(B$13:B16),AVERAGE(INDEX
($B$13:$B$26,IFERROR(MATCH(C16-4,$C$13:$C$26,0),1)):B16))
=C16+1-ISBLANK(B17) =IF(ISBLANK(A17),AVERAGE(B$13:B17),AVERAGE(INDEX
($B$13:$B$26,IFERROR(MATCH(C17-4,$C$13:$C$26,0),1)):B17))
2 4 =C17+1-ISBLANK(B18) =IF(ISBLANK(A18),AVERAGE(B$13:B18),AVERAGE
(INDEX($B$13:$B$26,IFERROR(MATCH(C18-4,$C$13:$C$26,0),1)):B18))
2 5 =C18+1-ISBLANK(B19) =IF(ISBLANK(A19),AVERAGE(B$13:B19),AVERAGE
(INDEX($B$13:$B$26,IFERROR(MATCH(C19-4,$C$13:$C$26,0),1)):B19))
2 6 =C19+1-ISBLANK(B20) =IF(ISBLANK(A20),AVERAGE(B$13:B20),AVERAGE
(INDEX($B$13:$B$26,IFERROR(MATCH(C20-4,$C$13:$C$26,0),1)):B20))
2 7 =C20+1-ISBLANK(B21) =IF(ISBLANK(A21),AVERAGE(B$13:B21),AVERAGE
(INDEX($B$13:$B$26,IFERROR(MATCH(C21-4,$C$13:$C$26,0),1)):B21))
=C21+1-ISBLANK(B22) =IF(ISBLANK(A22),AVERAGE(B$13:B22),AVERAGE(INDEX
($B$13:$B$26,IFERROR(MATCH(C22-4,$C$13:$C$26,0),1)):B22))
3 =C22+1-ISBLANK(B23) =IF(ISBLANK(A23),AVERAGE(B$13:B23),AVERAGE(INDEX
($B$13:$B$26,IFERROR(MATCH(C23-4,$C$13:$C$26,0),1)):B23))
3 8 =C23+1-ISBLANK(B24) =IF(ISBLANK(A24),AVERAGE(B$13:B24),AVERAGE
(INDEX($B$13:$B$26,IFERROR(MATCH(C24-4,$C$13:$C$26,0),1)):B24))
3 9 =C24+1-ISBLANK(B25) =IF(ISBLANK(A25),AVERAGE(B$13:B25),AVERAGE
(INDEX($B$13:$B$26,IFERROR(MATCH(C25-4,$C$13:$C$26,0),1)):B25))
3 10 =C25+1-ISBLANK(B26) =IF(ISBLANK(A26),AVERAGE(B$13:B26),AVERAGE
(INDEX($B$13:$B$26,IFERROR(MATCH(C26-4,$C$13:$C$26,0),1)):B26))
=C26+1-ISBLANK(B27) =IF(ISBLANK(A27),AVERAGE(B$13:B27),AVERAGE(INDEX
($B$13:$B$26,IFERROR(MATCH(C27-4,$C$13:$C$26,0),1)):B27))
Please note that I did not apply an average of averages but just a
simple total average which I regard as correct (better).
IFERROR(exp1,expr2) is an Excel 2007 function. In older versions you
would have to write IF(ISERROR(expr1),expr2,expr1).
Regards,
Bernd