Hi
I've created the macro below using VBA in excel and I'm trying to get the formula to copy to the last row of data within the spreadsheet rather than to a specific point.
Sub CopyForm()
'
Range("N1").Select
ActiveCell.FormulaR1C1 = "RR Termination Date"
Range("N2").Select
ActiveCell.FormulaR1C1 = "=DATE(YEAR(RC2), MONTH(RC2)+3, DAY(RC2))"
Range("N2").Select
Selection.AutoFill Destination:=Range("N2:N100")
Range("N2:N100").Select
End Sub
Can anyone tell me how I can do this please?
Thanks
Julie
I've created the macro below using VBA in excel and I'm trying to get the formula to copy to the last row of data within the spreadsheet rather than to a specific point.
Sub CopyForm()
'
Range("N1").Select
ActiveCell.FormulaR1C1 = "RR Termination Date"
Range("N2").Select
ActiveCell.FormulaR1C1 = "=DATE(YEAR(RC2), MONTH(RC2)+3, DAY(RC2))"
Range("N2").Select
Selection.AutoFill Destination:=Range("N2:N100")
Range("N2:N100").Select
End Sub
Can anyone tell me how I can do this please?
Thanks
Julie