Below is a possible solution to Challenge 30 – Average Last 5 Numbers in a Range.
Use below formula –
=IFERROR(AVERAGE(INDIRECT("A"&LARGE(INDEX(ISNUMBER(A1:A100)*
(ROW(A1:A100)),,),MIN(COUNT(A1:A100),5))&":"&"A"&LARGE(
INDEX(ISNUMBER(A1:A100)*(ROW(A1:A100)),,),1))),0)
The workbook containing this solution is uploaded to Solution – Challenge 30 – Average Last 5 Numbers in a Range