View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Summing a whole column

Hi Klaus,

Try something like:

Sub Tester()
Dim StartCell As Range
Dim LastCell As Range
Dim mySum As Double

Set StartCell = Range("A10") '<Your known first cell

Set LastCell = Cells(Rows.Count, StartCell.Column).End(xlUp)

mySum = Application.Sum(StartCell, LastCell)

MsgBox mySum

End Sub

---
Regards,
Norman



"Klaus" wrote in message
...
Given a starting location but not knowing how many cells will be included
(it
varies), is it possible to sum a whole column?