Option Explicit
Sub test()
Dim wb As Workbook
Dim Filepath As String
Filepath = "Filepath on the my computer"
Set wb = Workbooks("zMaster.xlsm")
With Workbooks.Open(Filepath & "A.xlsx")
.Sheets("A1").Cells(1).CurrentRegion.Offset(1).Copy _
wb.Sheets("sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(1)
.Sheets("A2").Cells(1).CurrentRegion.Offset(1).Copy _
wb.Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1)
.Close False
End With
With Workbooks.Open(Filepath & "B.xlsx")
.Sheets("B1").Cells(1).CurrentRegion.Offset(1).Copy _
wb.Sheets("sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(1)
.Sheets("C1").Cells(1).CurrentRegion.Offset(1).Copy _
wb.Sheets("sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(1)
.Sheets("B2").Cells(1).CurrentRegion.Offset(1).Copy
wb.Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset (1)
.Sheets("C2").Cells(1).CurrentRegion.Offset(1).Copy
wb.Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset (1)
.Close False
End With
With Workbooks.Open(Filepath & "C.xlsx")
.Sheets("D1").Cells(1).CurrentRegion.Offset(1).Copy _
wb.Sheets("sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(1)
.Sheets("D2").Cells(1).CurrentRegion.Offset(1).Copy _
wb.Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1)
.Close False
End With
With Workbooks.Open(Filepath & "D.xlsx")
.Sheets("E1").Cells(1).CurrentRegion.Offset(1).Copy _
wb.Sheets("sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(1)
.Sheets("E2").Cells(1).CurrentRegion.Offset(1).Copy _
wb.Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1)
.Close False
End With
End Sub