Another way. If there is room for a helper column first enter this formula in O2 and fill down. It can be any column. It repeats the initial boundary numbers for each section.
Formula:
=INDEX(N:N,MATCH("zzzzz",$N$2:N2,1))
Then in B1 filled down this non array formula.Formula:
=IFERROR(AVERAGEIF(O:O,ROWS($1:1)&"",N:N),"")
Bookmarks