Delete sums that add to 0 inside a bigger summatory

Kyrpo

Board Regular
Joined
Jul 24, 2015
Messages
127
Hi everyone I'm new to this site and <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: rgb(0, 0, 0); cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">vba</acronym> in general and I would very much appreciate help since I'm kinda stuck right now...

In the C column I got a list of numbers and their sum in a bottom yellow cell (in this pic red value). This numbers inside this big summatory sometimes add to 0 (like C2:C6 in the pic orange values)

What I would like to have is a simplified version of column C in colum D where the numbers of the summatory that add to 0 inside the big sum are removed.

Basically if c2+c3=0 remove them, otherwise add c3, if c1+c2+c3=0 remove themm otherwise add c4... and so on..

I'm sorry if I didn't sound clear this a pic of what i mean.


<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>
CD
InputOutput
11
23
32
4-4
-102
1
3
2
-4
2

<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>


Thanks for your time.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
The numbers with plus sign are invoices and the one with minus sign are payments that sometimes cover more then 1 invoice.

So basically i have invoices for ex. 3 4 5 in the column and a payment of 12 that delete all the previous 3 invoices immediatly after them. Deleting this operations will help me isolate the invoices that still need to be paid.
 
Upvote 0

Forum statistics

Threads
1,213,529
Messages
6,114,155
Members
448,554
Latest member
Gleisner2

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