Running Average

J

John Persico

How can I create a formula that creates a running average?

Example...
I have four column headings: Date, Weekly Pay, Weekly Average, Yearly
Total.
Each week I enter how much I'm paid in the Weekly Pay.
The formula under Yearly Total is =IF(B2="","",N(D1)+B2), then I copy the
formula down.
The Weekly Average would simply be the grand total divided by the number of
weeks.
What would the formula look like?
 
G

Guest

I think Don actually meant in C2 put
=AVERAGE(B$2:B2)
then copy this down column C.
(wrap it in an IF if you don't want numbers after the bottom of the filled
row)

Similarly your formula in D2 could be neater as:
=IF(B2="","",SUM(B$2:B2)
copied down
The advantage of this approach is that it does not depend on the rows above,
so if someone accidentally deletes (say) cell D5, the ones below it continue
to have correct answers, whereas with your method this would reset the sum
for D6 and everything after it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top