Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sum Function in Macro

I need to sum variable length rows in a macro. I use; Cells(ActiveCell.Row
+ 1, ActiveCell.Column).Select and then; ActiveCell.FormulaR1C1 =
"=SUM(R[-54]C:R[-1]C)".

Thanks,
Tim


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Sum Function in Macro

Tim,

Not really sure what the question is but this will sum from row 1 to the
current row

With ActiveCell
Cells(.Row + 1, .Column).FormulaR1C1 = "=SUM(R1C:R[-1]C)"
End With


What exactly do you want to sum?

--

HTH

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

"Tim" wrote in message
t...
I need to sum variable length rows in a macro. I use;

Cells(ActiveCell.Row
+ 1, ActiveCell.Column).Select and then; ActiveCell.FormulaR1C1 =
"=SUM(R[-54]C:R[-1]C)".

Thanks,
Tim




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
Macro + IF Function? Gunti Excel Discussion (Misc queries) 1 December 9th 08 09:08 AM
Using A Function in a Macro Jai_Friday Excel Worksheet Functions 2 March 13th 08 01:18 PM
Is there a Function or Macro for This? Marilyn Excel Discussion (Misc queries) 6 November 6th 07 03:21 AM
Sub Macro vrs Function Macro Auto Start Pat Excel Discussion (Misc queries) 7 June 6th 07 09:53 PM
Macro within a function? stevieboy1313 Excel Worksheet Functions 1 September 19th 06 07:57 PM


All times are GMT +1. The time now is 07:22 AM.

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

About Us

"It's about Microsoft Excel"