View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DG DG is offline
external usenet poster
 
Posts: 46
Default Sum a column of data

How do I sum a column of data in a macro?

Assume I have a worksheet and cells C1 through C20 have numbers. How can I
get the sum of those numbers without a loop?

I tried
Total = Sum(Range("C1").End(xlDown))

But got an error that Sum is not defined as a funtion.

DG