To all,
I am trying to make a macro that autofills a formula to the end of a specified range. This is great, but the data is always changing so there will frequently be a different number of rows. I've spent the last hour Google searching a solution but none apply to my situation. Here is the VBA-coding
Sub Diff()
'
' Diff Macro
'
'
Range("I2").Select
ActiveCell.FormulaR1C1 = "=RC[-4]-RC[-2]"
Range("J2").Select
ActiveCell.FormulaR1C1 = "=RC[-4]-RC[-2]"
Range("I2:J2").Select
Selection.AutoFill Destination:=Range("I2:J213")
Range("I2:J213").Select
End Sub
I think the main problem is that the formula applys to two columns, so all of the other internet solutions didn't work. If you need more specification, let me know.
Thanks!
Bookmarks