How to running subtotal and reset based on a day of the month?

Alex20850

Board Regular
Joined
Mar 9, 2010
Messages
146
Office Version
  1. 365
Platform
  1. Windows
I have a list of amounts that need running subtotals UNTIL a new time period is started on the 6th of the month.
Then, the running subtotals restart at 0 and collect until the 6th of the next month.

Sample Data:

DateAmountRunning Totals
1/6/21100100
1/7/2150150
...
2/6/217575
2/7/2125100
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
MrExcelPlayground6.xlsx
ABC
1DateAmountRunning monthly
21/6/20211919
31/7/20215271
41/8/20211283
51/9/202161144
61/10/202164208
71/11/202115223
81/12/202152275
91/13/202158333
101/14/202121354
111/15/202196450
121/16/202150500
131/17/202194594
141/18/202114608
151/19/202112620
161/20/202143663
171/21/202177740
181/22/202198838
191/23/202160898
201/24/202159957
211/25/2021591016
221/26/2021431059
231/27/2021891148
241/28/2021771225
251/29/2021501275
261/30/2021951370
271/31/2021921462
282/1/2021461508
292/2/2021961604
302/3/2021961700
312/4/2021711771
322/5/2021831854
332/6/20211414
342/7/20216579
352/8/202161140
362/9/202121161
372/10/202182243
382/11/202188331
392/12/202131362
402/13/202111373
412/14/202169442
422/15/202199541
432/16/202184625
442/17/202137662
452/18/202141703
462/19/202135738
472/20/202121759
482/21/202198857
492/22/202115872
502/23/202161933
512/24/202134967
522/25/2021831050
532/26/2021261076
542/27/2021451121
552/28/2021731194
563/1/2021811275
573/2/2021211296
583/3/2021571353
593/4/2021201373
603/5/2021201393
613/6/20211515
623/7/20216681
633/8/202169150
643/9/202183233
Sheet23
Cell Formulas
RangeFormula
C2:C64C2=SUMPRODUCT(B$2:B2,--(MONTH(A$2:A2-5)=MONTH(A2-5)),--(YEAR(A$2:A2-5)=YEAR(A2-5)))
 
Upvote 0
Wow, works. Not familiar with the formulas, but I will look into them. Thanks!
 
Upvote 0
The solution to this depends on the consistency of the data. If there is always one entry per day (with no days missing) then this will work. If either of those points is not the case then it will need something less simple.
Book1
ABC
1DateAmountR/T
206/01/2021100100
307/01/202150150
406/02/20217575
507/02/202125100
Sheet2
Cell Formulas
RangeFormula
C2:C5C2=IF(DAY(A2)=6,B2,B2+C1)
 
Upvote 0
I have merged your two duplicate threads together.
Please do not start two threads on the same topic in the future.
Duplicate threads will typically be locked or deleted, as per forum rules.
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,143
Members
453,021
Latest member
Justyna P

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