LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default SUM in VBA

I would like to insert into a macro an instruction to insert the formula that
sums all the cells (in the existing column) from row 3 to the row just above
the cell with the SUM formula.
I have tried the following without success (generates a VBA error):

ActiveCell.FormulaR1C1 = "=SUM(R[-3]C:R[ActiveCell.Offset(-1)]C)"

If someone could help, I would be most grateful.
Thanks.
 
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



All times are GMT +1. The time now is 01:49 PM.

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"