I have a data file, that I will keep adding new rows to the end of the existing data weekly. For the new rows added, I need to vlookup column A, to fill the Qtr and Year in column "G" & "H" and updated in column "I" with "done" text. I tried following, but it's not dynamic and the vlookup formula and code is not working.
Dim lastA As Integer
Worksheets("Data").Range("A1").AutoFilter
ActiveSheet.Range("A:I").AutoFilter Field:=9, Criteria1:="="
Range("A1").Offset(1, 0).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveCell.Offset(0, -6).PasteSpecial (xlPasteValues)
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC1,WW!C3:C6,2,0)"
Selection.AutoFill Destination:=Range("G2667:H2667"), Type:=xlFillDefault
lastA = Range("A" & Rows.Count).End(xlUp).Row
lastG = Range("G" & lastA).End(xlUp).Row + 1
value2Paste = "done"
Range("I" & lastI & ":I" & lastA) = value2Paste*
Attached the sample of the file and data