Macro to add down a column

Closed
Blind156 Posts 4 Registration date Friday June 6, 2014 Status Member Last seen June 20, 2014 - Jun 20, 2014 at 09:59 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jun 23, 2014 at 12:45 AM
Hello all,

I need a macro that will sum numbers down a column until it gets as close to 8 as possible.
ex:

1
.5
.5
4
3
.5
3
2

so a space would need to be inserted in the 5th column with the sum of 6 because it cannot add the 3 to surpass 8. Please help!

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Jun 23, 2014 at 12:45 AM
suppose your data is from A1 down to A8

in B1 type the formula
=SUM($A$1:A1)
copy B1 down
you know where it sums up to 8

quote
so a space would need to be inserted in the 5th column with the sum of 6 because it cannot add the 3 to surpass 8.
unquote
not clear what you want.
0