I'm trying to copy and paste data from columns A and AI up to the last populated row in a pivot table that is located in columns AO to AP.
I have tried this code but it keeps pasting beyond the last row of the pivot table.
Sub Test1()
Dim LastRow As Long
Set blah = Range("A2:AI2")
Sheets("FI").Activate
LastRow = Cells(Cells.Rows.Count, "AO").End(xlUp).Row
Range("A2:AI2" & LastRow).FillDown
End Sub