View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default calculate sum of range

One way:

With Range("I1").End(xlDown)
.Offset(1, 0).Value = _
Application.Sum(Cells(1, .Column).Resize(.Row))
End With

In article ,
Paulg wrote:

I posted previoulsy that I needed to select the cell below a column of
numbers in order to calculate a sum. I have that.

range("I1").End(xlDown).Offset(1, 0).Select 'Next Blank Cell in column
i

I need coding to add to this line which will allow me to calculate the
sum of the column. I need the coding to account for spreadsheets with
different numbers of rows.

Thanks

Paul