I have a Macro that uses a simple formula. I have to update it everyday though as I'm adding a line everyday. the code is this:
ActiveCell.FormulaR1C1 = "=(R[-89]C-RC[-1])/R[-89]C"
What turns up in the spread sheet is this:
=(D2-C91)/D2
The two "D2"s stay the same as more rows are added only the C91 will change, its the row that I'm on. When I add a line tomorrow I'll be on row 92 so the spread sheet will say this:
=(D2-C92)/D2
and the Macro will have to be updated to this:
ActiveCell.FormulaR1C1 = "=(R[-90]C-RC[-1])/R[-90]C"
What I need to know is if there is a way to just hard code the "D2" in instead of the row shift reference? It would be much better to just run the macro and not have to update it first every time. I'm sure there's a way to do it, I just can't figure it out.
Bookmarks