Thread: Sum in VBA
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Sum in VBA

Here is the code:

ActiveSheet.Range("A17") = Application.Sum(ActiveSheet.Range("A1:A16"))

This inserts the total. Not a formula.

HTH

"Susan Hayes" wrote:

Hello

How can I sum up for example A4 through A16 and have the total appear in A17, i.e., A17 = SUM(A4:A16)

What is the VBA syntax to get the above.


Thank you,

Jen T.