Formula to calculate automatically progressive average of monthly expenses

vladimiratanasiu

Active Member
Joined
Dec 17, 2010
Messages
346
Office Version
  1. 2021
  2. 2019
Platform
  1. Windows
Hello!

I have a budget table with monthly expenses of an organization. Each cell filled in yellow summarizes costs resulted from all days of that month. I need a formula, to calculate automatically in the red cell progressive average of results (e.g. March 2022 – 1; September 2022 – 3.78), from the first month up to the last current one. Sometimes there are no monthly costs, but I wish they be taken into account as average elements, too.

Thank you!

Progressive average.xlsx
AB
131-Jan-22..............
21
328-Feb-22…...........
42
531-Mar-22…...........
60
730-Apr-22…...........
84
931-May-22…...........
105
1130-Jun-22…...........
126
1331-Jul-22…...........
147
1531-Aug-22…...........
160
1730-Sep-22…...........
189
1931-Oct-22…...........
200
2130-Nov-22…...........
220
2331-Dec-22…...........
240
25Progressive average
26Jan-221.00
27Feb-221.50
28Mar-221.00
29Apr-221.75
30…...................…...........
31Aug-223.125
32Sep-223.78
33Oct-220.00
34Nov-220.00
35Dec-220.00
Sheet1
Cell Formulas
RangeFormula
B26B26=B2
B27B27=(B2+B4)/2
B28B28=(B2+B4+B6)/3
B29B29=(B2+B4+B6+B8)/4
B31B31=(B2+B4+B6+B8+B10+B12+B14+B16)/8
B32B32=(B2+B4+B6+B8+B10+B12+B14+B16+B18)/9
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Is this what you mean?

22 09 25.xlsm
AB
131-Jan-22..............
21
328-Feb-22…...........
42
531-Mar-22…...........
60
730-Apr-22…...........
84
931-May-22…...........
105
1130-Jun-22…...........
126
1331-Jul-22…...........
147
1531-Aug-22…...........
160
1730-Sep-22…...........
189
1931-Oct-22…...........
200
2130-Nov-22…...........
220
2331-Dec-22…...........
240
25Progressive average3.77777778
Average
Cell Formulas
RangeFormula
B25B25=AVERAGE(B1:INDEX(B1:B24,MONTH(TODAY())*2))
 
Upvote 0
Is this what you mean?

22 09 25.xlsm
AB
131-Jan-22..............
21
328-Feb-22…...........
42
531-Mar-22…...........
60
730-Apr-22…...........
84
931-May-22…...........
105
1130-Jun-22…...........
126
1331-Jul-22…...........
147
1531-Aug-22…...........
160
1730-Sep-22…...........
189
1931-Oct-22…...........
200
2130-Nov-22…...........
220
2331-Dec-22…...........
240
25Progressive average3.77777778
Average
Cell Formulas
RangeFormula
B25B25=AVERAGE(B1:INDEX(B1:B24,MONTH(TODAY())*2))
Thank you for the quick answer. I tried to adjust your formula, but my budget has a more complex structure and the final results are not the right ones. Giving the monthly intermediate results formula takes them into account too, resulting some wrong values. I attach a sample of two columns that respects the original structure of my table, hoping them to be useful in modify the initial formula.


Book3xlsx.xlsx
ABC
1Period
2Internet / TVPhone
3January
35Total 110.6074.02
36
37February
67Total122.20113.49
68
69March
101Total0.000.00
102
103April
134Total 88.6072.00
135
136May
168Total63.5838.00
169
170June
201Total61.0619.00
202
203July
235Tota0.000.00
236
237August
269Total 75.0074.00
270
271September
302Total 89.0014.00
303
304October
336Total 0.000.00
337
338November
369Total 0.000.00
370
371December
403Total0.000.00
404
405Annual expenses610.04404.51
406Medium expenses / month50.8433.71
407Progressive expenses / month55.3029.50
40867.7844.95
Sheet1
Cell Formulas
RangeFormula
B35:C35,B403:C403,B369:C369,B336:C336,B269:C269,B235:C235,B168:C168,B101:C101B35=SUM(B4:B34)
B67:C67B67=SUM(B38:B66)
B134:C134,B302:C302,B201:C201B134=SUM(B104:B133)
B405:C405B405=B35+B67+B101+B134+B168+B201+B235+B269+B302+B336+B369+B403
B406:C406B406=B405/12
B407:C407B407=AVERAGE(B1:INDEX(B1:B404,MONTH(TODAY())*2))
B408:C408B408=(B35+B67+B101+B134+B168+B201+B235+B269+B302)/9
 
Upvote 0
Is this what you mean?

22 09 25.xlsm
AB
131-Jan-22..............
21
328-Feb-22…...........
42
531-Mar-22…...........
60
730-Apr-22…...........
84
931-May-22…...........
105
1130-Jun-22…...........
126
1331-Jul-22…...........
147
1531-Aug-22…...........
160
1730-Sep-22…...........
189
1931-Oct-22…...........
200
2130-Nov-22…...........
220
2331-Dec-22…...........
240
25Progressive average3.77777778
Average
Cell Formulas
RangeFormula
B25B25=AVERAGE(B1:INDEX(B1:B24,MONTH(TODAY())*2))
If it's useful for you, I attach also a link with my last table, keeping its original size. Progressive average.xlsx
 
Upvote 0
I attach a sample of two columns that respects the original structure of my table,
Hmm, that is nothing at all like what you presented initially! No wonder the suggestion did not work. :unsure:

The first thing that you need to do is to clean up and standardise your data. In column A you have several 'Total' cells that contain "Total", several that contain "Total " (trailing space) and one that contains "Tota" :eek:

Once that is done, you could try this formula in B407

Excel Formula:
=AVERAGEIFS(B3:INDEX(B:B,AGGREGATE(15,6,ROW($A1:$A404)/($A1:$A404="Total"),MONTH(TODAY()))),$A3:INDEX($A:$A,AGGREGATE(15,6,ROW($A1:$A404)/($A1:$A404="Total"),MONTH(TODAY()))),"Total")
 
Upvote 0
Solution
=AVERAGEIFS(B3:INDEX(B:B,AGGREGATE(15,6,ROW($A1:$A404)/($A1:$A404="Total"),MONTH(TODAY()))),$A3:INDEX($A:$A,AGGREGATE(15,6,ROW($A1:$A404)/($A1:$A404="Total"),MONTH(TODAY()))),"Total")
I've made all necessary corrections, and your formula gives exactly the results I need for! Thank you very much:)
 
Upvote 0
You're welcome. Thanks for the confirmation.
 
Upvote 0

Forum statistics

Threads
1,214,981
Messages
6,122,565
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top