Cumulative backwards sum

alepaladio

New Member
Joined
Apr 27, 2015
Messages
2
Hi everyone, I have an issue, how can you, using excel vba 2010 do a sum of the elements of a column backwards, i have this

[TABLE="width: 240"]
<colgroup><col width="80" span="3" style="width:60pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 80"]Sum[/TD]
[TD="class: xl63, width: 80"][/TD]
[TD="class: xl63, width: 80, align: right"]0.7447[/TD]
[/TR]
[TR]
[TD="class: xl63"]Sum by 1/3[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63, align: right"]0.2482[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]0.0980[/TD]
[TD="class: xl63, align: right"]0.7448[/TD]
[TD="class: xl63, align: right"]0.0730[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]0.2000[/TD]
[TD="class: xl63, align: right"]0.7448[/TD]
[TD="class: xl63, align: right"]0.1490[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]0.2627[/TD]
[TD="class: xl63, align: right"]0.7448[/TD]
[TD="class: xl63, align: right"]0.1957[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]0.1804[/TD]
[TD="class: xl63, align: right"]0.7448[/TD]
[TD="class: xl63, align: right"]0.1344[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]0.0863[/TD]
[TD="class: xl63, align: right"]0.7448[/TD]
[TD="class: xl63, align: right"]0.0643[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]0.0941[/TD]
[TD="class: xl63, align: right"]0.7448[/TD]
[TD="class: xl63, align: right"]0.0701[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]0.0431[/TD]
[TD="class: xl63, align: right"]0.7448[/TD]
[TD="class: xl63, align: right"]0.0321[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]0.0235[/TD]
[TD="class: xl63, align: right"]0.7448[/TD]
[TD="class: xl63, align: right"]0.0175[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]0.0118[/TD]
[TD="class: xl63, align: right"]0.7448[/TD]
[TD="class: xl63, align: right"]0.0088[/TD]
[/TR]
</tbody>[/TABLE]
where value 0.7447 is the sum of last column, and sum by 1/3 is 0.7447*1/3

what I need, is to make a sum, starting from last value in last column (Cells(11,3)), and stop when it is greater than sum by 1/3. I have this...

For i = 8 To 0 Step -1
Cells(11 - i, 4) = i
Next i


this helps me count from 0 to 8 backwards, but I dont know hot to make the cumulative sum, until It reaches 0.2482, please help!

Thanks for your help!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
In your example the sum of the last column is 0.7449 not 0.7447
 
Upvote 0
I will look tomorrow, I wanted to make sure we were on the same page before I went any further....
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,111
Members
452,302
Latest member
TaMere

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