Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro + IF Function? | Excel Discussion (Misc queries) | |||
Using A Function in a Macro | Excel Worksheet Functions | |||
Is there a Function or Macro for This? | Excel Discussion (Misc queries) | |||
Sub Macro vrs Function Macro Auto Start | Excel Discussion (Misc queries) | |||
Macro within a function? | Excel Worksheet Functions |