vba coding for formula in cell
I am trying to use vba code to enter a formula similar to the one below.
ActiveCell.FormulaR1C1 = "=R[-31]C-R[-32]C"
The differences are that the [-31] and [-32] are dependent upon the number
of rows in a section of the spreadsheet. They can be calculated by the
following:
Num1 = Range("Top_adj:Bottom_adj").Rows.Count + 3
and
Num 2= Range("Top_adj:Bottom_adj").Rows.Count + 2
What is the code? Thanks.
|