I want to create a column in P called Age of Ticket
. It is calculating two dates and then autofill. This macro will be used for reports that vary the number of rows. When I use this, it basically does the calculation on P2, then it does the calculation on P1 (where the label is) and doesn't autofill.
Dim LastRow As Long
LastRow = Range("P65000").End(xlUp).Row
Range("P1").Select
ActiveCell.FormulaR1C1 = "Age of Ticket"
Range("P2").Select
ActiveCell.FormulaR1C1 = "=RC[-5]-RC[-8]"
Range("P2").Select
Selection.AutoFill Destination:=Range("P2:P" & LastRow)
Range("P2:P3000").Select
ActiveWindow.SmallScroll Down:=210
[Results]