Summing ranges

H

Hru48

Hey,

I know this has been gone over before but I'm still having a wee bit of
difficulty - I have a set of numbers which I need to sum every month but
every month the amount of numbers (one month it would be (sum c17:c22)
the next it could be (sum c17:c30) etc) in the set changes.

The set of numbers start on cell c17 and have another set of numbers
after them after a gap of blank cells.

So I'm thinking I need a range that will select the cells until it
comes to an empty one.. maybe a do while loop? and then I could just
put a sum funtion at the top..

Let me know if you have any thoughts.

Many thanks

Hayley
 
B

Bob Phillips

Hayley,

You could just a large range (=SUM(C17:C2000), or if that is not good
enough, maybe

=SUM($C$17:INDEX($C$1:$C$1000,MIN(IF($C$17:$C$1000="",ROW($C$17:$C$1000)))))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)
 
Top