#1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Summing

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Summing

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

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Summing

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

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Summing

It doesn't work. It doesn't like the colon. Thanks.
Any other thoughts?


-----Original Message-----
Two options:
Range("A" & m).formula = SUM("V" & m: "V" & (n-

1)) 'puts the formula
into the cell Am
Range("A" & m).Value = worksheetfunction.SUM("V" &

m: "V" & (n-1))
'puts the result of the sum into cell Am

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

.

  #6   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Summing WRC Excel Worksheet Functions 4 November 5th 07 11:15 PM
Summing Catherine Excel Worksheet Functions 4 April 26th 07 06:44 PM
PivotTable and summing/not summing ~*Amanda*~[_2_] Excel Discussion (Misc queries) 1 March 14th 07 07:35 PM
Summing all BUT one... popunonkok Excel Worksheet Functions 6 April 26th 06 08:35 PM
summing ChrisG[_4_] Excel Programming 2 September 22nd 03 11:13 PM


All times are GMT +1. The time now is 06:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"