Macro to add down a column

Closed
Blind156 Posts 4 Registration date Friday 6 June 2014 Status Member Last seen 20 June 2014 - 20 Jun 2014 à 09:59
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 23 Jun 2014 à 00:45
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 14 June 2009 Status Contributor Last seen 7 August 2021 811
23 Jun 2014 à 00:45
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.