Cumulative sum with data in unequal increments

Chris88kemp

New Member
Joined
Oct 8, 2019
Messages
1
Dear All,

I would like to calculate the cumulative volume of liquid from a pipe over the period of 22 years. Data has been given on a daily basis, however in some instances this covers multiple days.

The format of the native data is as follows:


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]DAY[/TD]
[TD]LIQUID RATE, M3/D[/TD]
[TD]CUMULATIVE VOLUME, M3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]202[/TD]
[TD]= 202[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]210[/TD]
[TD]= 210 + 202[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]215[/TD]
[TD]= 215 + 210 + 202[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]280[/TD]
[TD]= 280 + (215 * (13 - 3)) + 210 + 202
[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]330[/TD]
[TD]= 330 + (280 * (30 - 13))+ (215 * (13 - 3)) + 210 + 202[/TD]
[/TR]
[TR]
[TD]etc[/TD]
[TD]etc[/TD]
[TD]etc[/TD]
[/TR]
</tbody>[/TABLE]

The issue starts on day 3 where the daily flowrate of 215 continues through to day 13, which then increases to 280 per day until day 30.

Does anyone know how this can be neatly calculated in a formula which I can replicate down. The data has 10,000 + rows so adding intermediate rows to cover each individual days is impractical.

Thanks in advance
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
How about


Book1
ABC
1DAYLIQUID RATE, M3/DCUMULATIVE VOLUME, M3
21202202
32210412
43215627
5132802842
6303307652
Planner
Cell Formulas
RangeFormula
C2=B2
C3=B2*(A3-A2-1)+B3+C2
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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