PDA

View Full Version : Solved: Excel Macro Formula



joms
11-10-2011, 03:12 AM
ActiveCell.FormulaR1C1 =SUM(RC[-9]:RC[-2])

hi guys, how to read this recorded formula by the macro. Thanks.

joms
11-10-2011, 03:30 AM
ActiveCell.FormulaR1C1 =SUM(RC[-9]:RC[-2])

hi guys, how to read this recorded formula by the macro. Thanks.

never mind got it, correct me if i'm wrong:

RC[-9] = current row, 9 columns before the current column

RC[-2] = current row, 2 columns before the current column (is the last cell)

mdmackillop
11-10-2011, 06:03 AM
Correct, but I would use the term "offset" as in the Excel function

joms
11-10-2011, 07:29 PM
Thanks, Mdmackillop. :)