I need to copy a formula in a variable length column via a macro.
I am using the following:
Range("I2").Select
ActiveCell.FormulaR1C1 = "=RC[-1]-RC[-2]"
Selection.AutoFill Destination:=Range("I2:I6264"), Type:=xlFillDefault
Range("I2:I6264").Select
Obviously, this is not acceptable for variable lengths.
What can I do to accomplish?
Thanks,
I am using the following:
Range("I2").Select
ActiveCell.FormulaR1C1 = "=RC[-1]-RC[-2]"
Selection.AutoFill Destination:=Range("I2:I6264"), Type:=xlFillDefault
Range("I2:I6264").Select
Obviously, this is not acceptable for variable lengths.
What can I do to accomplish?
Thanks,