VBA HELP: Formula to rebalance negative

imanoob

New Member
Joined
May 19, 2018
Messages
1
Hello,
I am new to this forum and i am having issues with adding the value of the next cell to the negative value of the previous cell.
Cell values are dynamic and not always in order. Is there an excel or vba command to get the value of positive numbers and
add it on the negative value to make it positive and rebalance?

1234567891011123description
10002001888-2088-1000dynamic amount
fromtoamount
12310111000
4561011200
7891011888
78912131000

<tbody>
</tbody>












if checked the total amount of negative values is equal to -3088
now I did rebalance it by adding the value of the positive amounts from left to right.
The total value of the positive amounts is also 3088. Now after rebalance there's no more negative values.

Do i have to write a function for this or a simple loop will do the trick?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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