Please Help. How to restart running total if given condition is satisfied

rival36

New Member
Joined
May 31, 2019
Messages
41
Office Version
  1. 2016
Platform
  1. Windows
Dear all, I am Stuck in this. Please Help

I want to restart the running total of column 'A' in column 'B' if the value in condition column 'C' is more than 0. the required result is shown in objective column 'D'

ABCD
DataRunnnin TOTALCONDITIONObjective
1111110111
2553660366
2125780578
13285.813863.8013863.8
9341.2523205.05023205.05
5539.5528744.6028744.6
10808.7539553.35039553.35
2186.441739.75974.383752186.4
2269.844009.5504456.2
044009.5504456.2
044009.5504456.2
9603.553613.05014059.7
11649.265262.25025708.9
5610.670872.85031319.5
224173113.85671.58252241
073113.8502241
073113.8502241
073113.8502241
6224.7579338.608465.75
2563.481902011029.15
6395.7588297.75017424.9
088297.75017424.9
12904.35101202.1435.622512904.35
0101202.1012904.35
0101202.1012904.35
0101202.1012904.35
6881.85108083.95019786.2
13545.2121629.15033331.4
555554677183.15510.67625555554
13571.4690754.550569125.4
6490697244.550575615.4
12527.9709772.450588143.3
0709772.450588143.3
12758.2722530.650600901.5
12358.3734888.950613259.8
0734888.950613259.8
6311.75741200.70619571.55
6273.8747474.50625845.35
12416.15759890.650638261.5
12109.75772000.40650371.25
11766.85783767.250662138.1
11557.05795324.30673695.15
11389.5806713.80685084.65
0806713.80685084.65
0806713.80685084.65
54554861267.83238.2662554554
2861269.8054556
12861281.8054568
0861281.8054568
2657863938.8057225
2647.9866586.7059872.9
58884925470.7132.622558884
46925516.7058930
312925828.7059242
0925828.7059242
3071.1928899.8062313.1
12203.25941103.05074516.35
0941103.05074516.35
15089.65956192.7381.8587515089.65
0956192.7015089.65
0956192.7015089.65
16412.15972604.85031501.8
0972604.85031501.8
0972604.85031501.8
3473.4976078.25034975.2
8761.35984839.6043736.55
8667.45993507.05052404
8573.051002080.1060977.05
8479.71010559.81524.426258479.7
3383.41013943.2011863.1
44451018388.2296.57754445
551018443.204500
01018443.204500
17532.51035975.7022032.5
3492.21039467.9438.31253492.2
01039467.903492.2
9234.91048702.8012727.1
55551054257.8318.17755555
9341.21063599014896.2
3778.11067377.1233.533778.1
18676.051086053.15022454.15
9270.71095323.85561.353759270.7
01095323.8509270.7
18995.351114319.2231.767518995.35
01114319.2018995.35
01114319.2018995.35
4663.51118982.7023658.85
174901136472.7041148.85
01136472.7041148.85
21448.81157921.5062597.65
10546.551168468.05073144.2
01168468.05073144.2
21443.751189911.8094587.95
01189911.8094587.95
555551245466.81889.81555555
22221247688.8057777
01247688.8057777
22468.251270157.05080245.25
4475.41274632.45561.706254475.4
22168.751296801.2026644.15
4389.11301190.3666.103754389.1
10979.31312169.6015368.4
10915.51323085.1026283.9
01323085.1026283.9
11451.151334536.25037735.05
01334536.25037735.05
22975.851357512.1559.1662522975.85
17214.151374726.25040190
21176.451395902.7061366.45
16189.051412091.75077555.5
99981422089.75087553.5
19731.551441821.30107285.05
19299.751461121.050126584.8
01461121.050126584.8
01461121.050126584.8
20008.9514811300146593.75
014811300146593.75
014811300146593.75
4110.31485240.3
0150704.05
20037.61505277.90170741.65
4035.41509313.34268.541254035.4
9992.151519305.45014027.55
19725.81539031.25033753.35
14795.41553826.650
48548.75
18183.951572010.6066732.7
01572010.6066732.7
18226.91590237.5084959.6
13872.751604110.25098832.35
01604110.25098832.35
01604110.25098832.35
21211606231.252470.808752121
1211606352.250
2242
4551606807.2502697
8888882495695.250891585

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>


THANKS A LOT
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
try this in D2 and copy down

Code:
=SUM($A$2:A2)-IFERROR(SUM(OFFSET($A$1,1,0,MATCH(LOOKUP(2,1/($C$2:C2>0),$C$2:C2),$C$2:C2,0)-1,1)),0)
 
Upvote 0
Cross posted https://www.excelforum.com/excel-ge...ng-total-if-given-condition-is-satisfied.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
thanks a loot AlanY;5286155 u just saved my life... it worked..:)
 
Upvote 0
try this in D2 and copy down

Code:
=SUM($A$2:A2)-IFERROR(SUM(OFFSET($A$1,1,0,MATCH(LOOKUP(2,1/($C$2:C2>0),$C$2:C2),$C$2:C2,0)-1,1)),0)
Alan I need one more help. You Solved me a Conditional Formula Problem Previously. It worked great. I am stuck in new one! Please help.
Please refer to attached image. I want following result:
If C5 is greater than zero Put B6=A5, Otherwise Return B6= Value in Cell A Whenever Cell C has number greater than Zero Previously.

Want This Result
ABCABC
541542
101540
5450545540
45045540
515541
7827852
80080780
404780
87187784
505870
414876
Waiting for your reply..
 

Attachments

  • Untitled.png
    Untitled.png
    28.4 KB · Views: 10
Upvote 0
@rival36
You have already been warned about crossposting in this thread, yet you have ignored that & cross posted again without supplying a link.
Please supply all link(s). Thanks
 
Upvote 0
try this in D2 and copy down

Code:
=SUM($A$2:A2)-IFERROR(SUM(OFFSET($A$1,1,0,MATCH(LOOKUP(2,1/($C$2:C2>0),$C$2:C2),$C$2:C2,0)-1,1)),0)
My thread link is below
 
Upvote 0
That is a link to you duplicate post on this board (which has now been closed).
You need to supply link(s) to the other site(s) where you have asked this question.
 
Upvote 0

Similar threads

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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