Thread: Summing
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Summing



"JWolf" wrote in message
...
Two options:
Range("A" & m).formula = SUM("V" & m: "V" & (n-1)) 'puts the formula
into the cell Am


I think that you mean

Range("A" & m).formula = "=SUM(V" & m & ":V" & (n-1) & ")"

Range("A" & m).Value = worksheetfunction.SUM("V" & m: "V" & (n-1))
'puts the result of the sum into cell Am


Range("A" & m).Value = worksheetfunction.SUM("V" & m & ":V" & (n-1))

wrote:

I want to set a column equal to the sum of some other
columns in a macro. It is not working. Can you help.
This is what I have.

Range("A" & m).Value = SUM("V" & m: "V" & (n-1))

Thank you