#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Sum Formula

How can I enter a formula with a macro that will sum all the rows above it in
that column? I need the formula to be entered into the cell 2 rows below the
last row with data in that column.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Sum Formula

Sub SumFormula()
Cells(65000, ActiveCell.Column).End(xlUp). _
Offset(2, 0).FormulaR1C1 = "=SUM(R1C:R[-2]C)"
End Sub

HTH. Best wishes Harald

"Josh O." skrev i melding
...
How can I enter a formula with a macro that will sum all the rows above it

in
that column? I need the formula to be entered into the cell 2 rows below

the
last row with data in that column.



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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 05:16 PM.

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"