The result is a range that includes the N cells to average.
In the example, F4 contains 3, so the row number is 10-(3-1) = 8.
With a row number of 8, INDEX returns C12.
The AVERAGE function then returns the average of C12:C14, which is $78.33.
you’re free to use INDEX to retrieve individual values, or entire rows and columns.
ROWS Function
The Excel ROWS function returns the count of rows in a given reference.