Create another sheet in the Master workbook called Templates. A1 = "Folder", B1 = "Template" for headings. Enter your folder and heading names beneath. If all the templates will be in the same folder, then you can just enter it into B2 and adjust the code to use B2 for all folders.
Add the code below to the Templates sheet, and if you want, add a "Get Template Data" button to run the code, or you can just assign it to a shortcut key.
Option Explicit
Dim Folder As String, Template As String
Dim mrow As Long, trow As Long, tnamerow As Long, mcol As Long
Sub GetTemplateData()
Application.ScreenUpdating = False
Sheets("Templates").Select
With Sheets("Sheet1")
mrow = .Range("A" & Rows.Count).End(xlUp).Row + 1
mcol = .Range("A1").End(xlToRight).Column
tnamerow = 2
Do Until Cells(tnamerow, 2).Value = ""
Folder = Cells(tnamerow, 1).Value
Template = Cells(tnamerow, 2).Value
If Right(Folder, 1) <> "\" Then
Folder = Folder & "\"
End If
Application.StatusBar = "Opening " & Template
Workbooks.Open Folder & Template
trow = Range("A" & Rows.Count).End(xlUp).Row
Range(Cells(2, 1), Cells(trow, mcol)).Copy Destination:=.Cells(mrow, 1)
ActiveWorkbook.Close (False)
mrow = .Range("A" & Rows.Count).End(xlUp).Row + 1
tnamerow = tnamerow + 1
Loop
Application.StatusBar = False
End With
End Sub
Bookmarks