hi I encounter an error that it is invalid in red. How do I correct the column header "Header 2nd Number (Dept Office)"?
I'm using column header as this is a standard template.
Sub FillRows()
Dim last_row As Long
last_row = Cells(Rows.Count, 2).End(xlUp).Row
Range("A2").Formula = "=VLOOKUP([@[Header 2nd Number (Dept Office)],Sheet1!$A$1:$J$100,2,FALSE)"
Range(A2").AutoFill Destination:=Range("A2:A" & last_row)
End Sub
In addition, how do I apply the same to all files in a folder?
Hope to answer the first qns first.
Thank you!
Bookmarks