lastrow = Cells(Rows.Count, "A").End(xlUp).Row ' will give last row in column A
Cells(lastrow + 1, "A") = Application.Sum(Range(Cells(2, "A"),
Cells(lastrow, "A")))
HTH
> I want to make a macro in excel that will go to the end of a data column and
> do a summation of the data in the row immediately following the data.
lpdarspe - 28 Mar 2006 17:53 GMT
Thanks! It fit my requirements exactly!!
> lastrow = Cells(Rows.Count, "A").End(xlUp).Row ' will give last row in column A
>
[quoted text clipped - 5 lines]
> > I want to make a macro in excel that will go to the end of a data column and
> > do a summation of the data in the row immediately following the data.
and just to give another option, if you want a formula instead of the value for
the total, you could use this
Range("A" & Lastrow + 1).Formula = "=sum(A2:A" & Lastrow & ")"

Signature
Gary
>I want to make a macro in excel that will go to the end of a data column and
> do a summation of the data in the row immediately following the data.
lpdarspe - 28 Mar 2006 17:53 GMT
Thank you very much. It fit the requirements exactly!
> and just to give another option, if you want a formula instead of the value for
> the total, you could use this
[quoted text clipped - 3 lines]
> >I want to make a macro in excel that will go to the end of a data column and
> > do a summation of the data in the row immediately following the data.