Question-52


I need to sum a list of costs whose range will change as more entrys are made to the list. Can't I use variables showing the start and end addresses in my Sum formula THX!





Re: How to ues variables in a VBA sum formula - range(A1).Formula = "=sum(Var1,Var2)" ??

sjoo


If you need to sum A column, you can write sum formula as following:

=SUM(Offset(A1,0,0,COUNTA(A1:A65536),1))

parameters in Offset function:

1st : A1 - base cell

2nd: 0 - row offset from the base

3rd: 0 - column offset from the base

4th: COUNTA(A1:A65536) - numbers of row

5th: 1 - numbers of column

best regards,

sjoo