Hello Everyone
I have two workbook in one path and both have same headers.
I have code to merge both the workbook into one but then i need to combine them into one worksheet. like copy data from one sheet to paste on another sheet last filed row
I have two workbook in one path and both have same headers.
I have code to merge both the workbook into one but then i need to combine them into one worksheet. like copy data from one sheet to paste on another sheet last filed row
VBA Code:
Sub GetSheets()
Dim Path as Integer
Path = "[F4]"
Filename = Dir(Path & " \" & "*.xls")
Do While Filename <> ""
Workbooks.Open Filename:=Path & Filename, ReadOnly:=True
For Each Sheet In ActiveWorkbook.Sheets
Sheet.Copy After:=ThisWorkbook.Sheets(1)
Next Sheet
Workbooks(Filename).Close
Filename = Dir()
Loop
End Sub