'is it possible to write an array formula in google sheets that will increment cell referents?

i am tracking traffic data and keeping a running tally of new members, as well as a running average.

what i am currently doing is manually adding the formula to each cell every day, for e. g.

avg. daily attrition avg. total attrition
=AVERAGE(E2:E3) =AVERAGE(H2:H3)
=AVERAGE(E2:E4) =AVERAGE(H2:H4)
=AVERAGE(E2:E5) =AVERAGE(H2:H5)
=AVERAGE(E2:E6) =AVERAGE(H2:H6)
(...) (...)
=AVERAGE(E2:E366) =AVERAGE(H2:H366)

what i would like is a formula that only adds the new average to the latest cell, and doesn't affect the previous averages of older cells. so, using =AVERAGE(E2:E366) for the whole column is obviously right out.

i'm sure there's a way to do this, i just don't know what it is. i tried looking up array formulae, but based on how =ARRAY works, i don't think that would be suitable.

thanks in advance.

ETA: i found a tutorial. thank you for the answer.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source