View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default Sum Formula in Macro

If you have named ranges in your formula, they will always be absolute
references.

--

Vasant

"Tim U" wrote in message
...
I have a macro that enters a sum formula into a cell and copies the

formula
to several columns. The formula works in the initial cell but is simply
duplicated in the other columns when I want it to copy the formula using
relative cell addresses. Here is the formula in the macro:

ActiveCell.FormulaR1C1 = "=Sum(FIRSTROW:LASTROW)"

The named ranges FIRSTROW and LASTROW have been correctly set previously

in
the macro.

Does anyone have any ideas?

Thank you

Tim U