Average Every Nth Row
- All three finish in under a second for 1M rows but it seems like INDEX is faster than FILTER and FILTER is faster than Ron Rosenfeld's modernized version.
=LET(Data,D20:D35,nth,4,
AVERAGE(INDEX(Data,SEQUENCE((ROWS(Data)-1)/nth+1,,,nth))))
=LET(Data,D20:D35,nth,4,
AVERAGE(FILTER(Data,MOD(SEQUENCE(ROWS(Data)),nth)=1)))
=LET(Data,D20:D35,nth,4,
AVERAGE(IFERROR(Data*1/(MOD(SEQUENCE(ROWS(Data)),nth)=1),"")))