Haven't examined all the previous. Here's another way. Applied to workbook in post #11. It's just an extension of your own formula that also defines the lower boundaries of each subset.
=IFERROR(AVERAGE(OFFSET(INDEX(N$1:N$200,MATCH(ROWS($1:1)&"",N$1:N$200,0)),2,0):OFFSET(INDEX(N$1:N$200,MATCH(ROWS($1:1)+1&"",N$1:N$200,0)),-2,0)),"")
Must be array entered. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
Formula:
=IFERROR(AVERAGE(OFFSET(INDEX(N$1:N$200,MATCH(ROWS($1:1)&"",N$1:N$200,0)),2,0):OFFSET(INDEX(N$1:N$200,MATCH(ROWS($1:1)+1&"",N$1:N$200,0)),-2,0)),"")
This works for the data supplied.
Bookmarks