View Single Post
  #2   Report Post  
JN
 
Posts: n/a
Default

Thanks, Gary.

Does that mean I can change anything after the " = Sum" formula? I won't be
using SUM formula. I want to set up a formula to pull data from the last row
"Grand total" and divide it with a constant on the first row.

JN



"Gary Brown" wrote:

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