Skip to content

Instantly share code, notes, and snippets.

@tanzilhuda
Last active August 3, 2020 15:18
Show Gist options
  • Save tanzilhuda/eb36f780d53e1f74451e384e26c022e2 to your computer and use it in GitHub Desktop.
Save tanzilhuda/eb36f780d53e1f74451e384e26c022e2 to your computer and use it in GitHub Desktop.
Combine Multiple Excel Spreadsheet into One Excel File
Sub GetSheets()
'Update ExcelJunction.com
Path = ""
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
For Video tutorial: https://www.youtube.com/watch?v=JiAYngRcN0s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment