Counting hours against a target (14)

nikolacm

New Member
Joined
Mar 31, 2021
Messages
29
Office Version
  1. 365
Platform
  1. Windows
Hi there I am trying to calculate the total hours per date of an intuition program that I attend. First column shows the date, second column the hours the lesson took place and third column shows the cumulative hours. When I reach 14 hours I have to pay the agreed fee. To this end, I am looking for a formula which will restart counting from zero when I reach 14 hours.
I have tried a Sum - offset formula along with If statement but I am stuck. Any ideas ?


Thank you in advance,

Book1
BCDE
5Agreed Hours14
6
7DateHoursCumulative Hours
810-01-202222
911-01-202224
1012-01-202226
1113-01-202228
1214-01-2022210
1315-01-2022212
1416-01-2022214
Sheet1
Cell Formulas
RangeFormula
E8:E14E8=SUM(D$8:D8)
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Update your formula in row 8 to:

Excel Formula:
=MOD(SUM(D$8:D8)-1,14)+1

and fill down
 
Upvote 0
Solution
Map1
BCDEF
5Agreed Hours14
6
7DateHoursCumulative Hourspayment
84457122
944572240
1044573260
1144574280
12445752100
13445762120
1444577201
Blad1
Cell Formulas
RangeFormula
E8:E14E8=MOD(SUM(D$8:D8),$C$5)
F9:F14F9=TRUNC((E8+D9)/$C$5)
 
Upvote 0
Update your formula in row 8 to:

Excel Formula:
=MOD(SUM(D$8:D8)-1,14)+1

and fill down
Many thanks for your assistance. I was expecting it more complex but MOD seems to be a great function for that case!!
 
Upvote 0
Oh, and you can replace 14 in the formula with $C$6 since it's in your sheet.
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,375
Members
448,955
Latest member
BatCoder

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