You don't give a lot of detail and it sounds like homework but try this idea
Sub sumvarrows()
ac = 9
fr = 2 'or inputbox("Enter first row")
lr = Cells(Rows.Count, ac).End(xlUp).Row
MsgBox Application.Sum(Range(Cells(fr, ac), Cells(lr, ac)))
End Sub
--
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"Mike" <mike@mike1313.wanadoo.co.uk> wrote in message
news:uv%23svHskGHA.4200@TK2MSFTNGP05.phx.gbl...
> Hi All,
>
> I want to write a macro that totals the values in consecutive rows in a
> column in an Excel Spreadsheet.
> The start and end rows will alter so I will have to use variables to
> define the starting and the finishing cell.
> Can anyone help me write a formula that will do this,
>
> Thanks Mike.
>
Bookmarks