View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
curlydave curlydave is offline
external usenet poster
 
Posts: 206
Default summing up cells up to the first unused cell encountered

I suppose this would work, there will be problems though if the next
time you run the code the the last sum wasn't cleared so this code
will clear it first.

Dim s As Range

Set s = Range("A65536").End(xlUp)
s.ClearContents 'clears the last entry in Column A

Range("A9").End(xlDown).Offset(2, 0) = _
Application.Sum(Range(Range("A9"), Range("A9").End(xlDown)))