Trying to copy a forumla down a column using a variable for the end.
Posted by Brian A. on April 19, 2001 1:48 PM
I'm trying to write a fomula in a cell from a macro then
copy the formula down to the cells under it row X. Row #
X is held in a variable markhold.
Here's my code:
ActiveCell.FormulaR1C1 = "= RC[-1]/RC[-5]"
Selection.AutoFill Destination:=Range("Q18" & ":" & "Q" & markhold), Type:=xlFillDefault
I want the formula to copy from tow 18 to the variable row but the code bombs on the selection autofill line.
Thanks in advance for your help.