View Single Post
  #1   Report Post  
Gary Brown
 
Posts: n/a
Default Macro - formula for end of last row

This formual would put a SUM formula 2 lines below the end of your data in
Column E. Hope this example helps.
'/==================================/
Range("E" & _
(ActiveSheet.Cells.SpecialCells(xlLastCell).Row _
+ 2)).FormulaLocal = _
"=Sum(E2:E" & _
ActiveSheet.Cells.SpecialCells(xlLastCell).Row & ")"
'/==================================/

--
Gary Brown

Please rate this posting if it is helpful to you.


"JN" wrote:

Hi,

I want to set up a macro to have different formulas on the last row of the
worksheet. Each month, the amount of data is different. This is what the
macro to do:

two rows below the last row of the data, set up formulas in column E, L to
R. Each formula ties to data from the last row.

I tried to set up the macro using selection.end(xlsDown), somehow, I can't
make it to work. Please help. Thanx