Dynamic range

P

pelachrum

I need to add up numbers in a column, my column will have a dynamic
height though. The range now for instance is B3-B12, next month it
could be B3-B23 and so on. The very bottom field in that column will
sum up the above values but again that field will have to move down as
the column grows

Siggestions?
 
G

Gord Dibben

Create a Dynamic Range.

Insert>Name>Define

Copy the formula below and paste into the "refers to:" dialog box.

=OFFSET(Sheet1!$B$3,0,0,COUNTA(Sheet1!$B:$B),1)

Adjust Sheet1 to your sheetname

Give it a name like dyno and OK

In a cell enter =SUM(dyno)


Gord Dibben MS Excel MVP
 
D

Dave Peterson

How about just using a row number that's bigger than you'll ever need:

=sum(b3:b9999)
or even
=sub(b3:b65536)

And if you don't have numbers in B1:B2, you can just use:
=sum(b:b)

or if you have numbers:
=sum(b:b)-sum(b1:b2)
 
P

pelachrum

actually one followup question...

is there a way to make the
"=OFFSET(Sheet1!$B$3,0,0,COUNTA(Sheet1!$B:$B),1)" formula work when the
field that calculates the rest actually sits in the same column, on top,
in field B1 to be specific?
 
G

Gord Dibben

Change the refers to range

=OFFSET(Sheet1!$B$3,0,0,COUNTA(Sheet1!$B2:$B10000),1)

If you're going to do that, you may as well go with Dave P's suggestion of

=SUM($B$3:$B$10000) or some row number greater than you think will ever be
used.


Gord Dibben MS Excel MVP
 
Top