Sub a()
Dim X As Integer
Set shmap = ThisWorkbook.Sheets("MAP")
NumRows = 18 '
For X = 3 To NumRows
lastrow = shmap.Cells(Rows.Count, "A").End(xlUp).Row + 2
File = Cells(X, 2).Value
Code = Cells(X, 1).Text
Set wb = Workbooks.Open(File)
Range("A1:AZ100").Copy shmap.Cells(lastrow, 1)![]()
code to copy Range A100: Az200
wb.Close
Cells(X, 1).Copy Sheets(Code).Range("A100")
Next![]()
the copied data to go into the relevant sheet(not the cell name)
End Sub
Bookmarks