Adding series in a table and breaking again when the value reaches a limit

adriandwor

New Member
Joined
Sep 7, 2021
Messages
19
Office Version
  1. 2016
Platform
  1. Windows
Hey everyone,

I'm working on a school project and maybe one of you can help me with the following excel problem. I tried to google a little bit but I can't properly formulate my question.

I have a table in excel that looks like this:

sum of km.png


I'd like to be able to sum contents in U column automatically until the result reaches 235 and then start again from 0. Column B represents different days of the week. When a day changes, the calculations also should start from 0. There are about 5000 data points. Can anyone help?

Thanks a lot
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Try this in V2 and fill down.
Excel Formula:
=IF(N(V1)+U2>235,U2,N(V1)+U2)
Noting that you have a structured table, it may behave a little erratically when you add new rows, or if you try sorting. If that happens it may be necessary to re-enter the formula into V2 and fill down again. There are fixes to prevent the problems but often make things more complicated than they should be.
 
Upvote 0
This version also resets when the day changes:

Excel Formula:
=IF(OR(B2<>B1,N(V1)+U2>235),U2,N(V1)+U2)
 
Upvote 0
Solution
Cheers, Eric :)

I completely missed the change of day requirement.
 
Upvote 0
This version also resets when the day changes:

Excel Formula:
=IF(OR(B2<>B1,N(V1)+U2>235),U2,N(V1)+U2)

Absolutely brilliant. Thank you so much. Also thanks Jasonb75 for the little explanation :)
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,054
Latest member
juliecooper255

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