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:


DAYLIQUID RATE, M3/DCUMULATIVE VOLUME, M3
1202= 202
2210= 210 + 202
3215= 215 + 210 + 202
13280= 280 + (215 * (13 - 3)) + 210 + 202
30330= 330 + (280 * (30 - 13))+ (215 * (13 - 3)) + 210 + 202
etcetcetc

<tbody>
</tbody>

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
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
30,113
Office Version
365
Platform
Windows
How about

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style=";">DAY</td><td style=";">LIQUID RATE, M3/D</td><td style=";">CUMULATIVE VOLUME, M3</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="text-align: right;;">1</td><td style="text-align: right;;">202</td><td style="text-align: right;;">202</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style="text-align: right;;">2</td><td style="text-align: right;;">210</td><td style="text-align: right;;">412</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style="text-align: right;;">3</td><td style="text-align: right;;">215</td><td style="text-align: right;;">627</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style="text-align: right;;">13</td><td style="text-align: right;;">280</td><td style="text-align: right;;">2842</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style="text-align: right;;">30</td><td style="text-align: right;;">330</td><td style="text-align: right;;">7652</td></tr></tbody></table><p style="width:5.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Planner</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">C2</th><td style="text-align:left">=B2</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">C3</th><td style="text-align:left">=B2*(<font color="Blue">A3-A2-1</font>)+B3+C2</td></tr></tbody></table></td></tr></table><br />
 

Forum statistics

Threads
1,077,638
Messages
5,335,393
Members
399,015
Latest member
emalabel

Some videos you may like

This Week's Hot Topics

Top