How to merge excel files into one
Tutor 5 (68 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Merging Excel files is a process that consolidates data stored in multiple workbooks into a single file. The goal is to create one structured workbook that compiles all sheets or datasets without losing format, formulas, or headers. To merge Excel files into one, follow one of the methods below based on your workflow, data structure, and version of Excel.
Method 1: Merge Files by Copying Sheets Into One Workbook
This method joins entire worksheets into a single file.
Windows and Mac
-
Open all the workbooks you want to merge.
-
Go to the workbook that will store the combined data.
-
Right-click any sheet tab at the bottom.
-
Select Move or Copy.
-
In the To book dropdown, select the destination workbook.
-
Select the sheet location.
-
Select Create a copy if you want to keep the original.
-
Select OK.
Method 2: Merge Files With Power Query (Best for Large Datasets)
Power Query imports and consolidates multiple Excel files stored in a single folder.
Windows (Power Query Built In)
-
Store all Excel files you want to merge in one folder.
-
Open a new workbook.
-
Go to Data → Get Data → From File → From Folder.
-
Select the folder containing the files.
-
Select Combine & Transform.
-
Review the preview window.
-
Select OK.
-
Load the final merged table to Excel.
Mac
Power Query on Mac supports folder imports in the current Excel versions.
-
Place the files into a single folder.
-
Go to Data → Get Data → From File → From Folder.
-
Select the folder.
-
Select Combine & Load.
Method 3: Merge Files Using Copy and Paste (For Non-Structured Data)
This technique moves data from multiple sheets and arranges it in one list.
Windows and Mac
-
Open the destination workbook.
-
Open the first source workbook.
-
Select the data range.
-
Press Ctrl + C (Windows) or Command + C (Mac).
-
Go to the destination file.
-
Select the cell where merging should begin.
-
Press Ctrl + V (Windows) or Command + V (Mac).
-
Repeat for all files.
Method 4: Merge Excel Files With VBA (Automation)
This method bulk-imports all files from a folder into one workbook.
Windows and Mac Compatible
-
Press Alt + F11 to open the VBA editor.
-
Select Insert → Module.
-
Paste the code:
Sub MergeFiles()
Dim FileDialog As FileDialog
Dim FileObj As Object
Dim FilePath As String
Dim WS As Worksheet
Set FileDialog = Application.FileDialog(msoFileDialogFolderPicker)
If FileDialog.Show <> -1 Then Exit Sub
FilePath = FileDialog.SelectedItems(1) & "\"
FileObj = Dir(FilePath & "*.xlsx")
Do While FileObj <> ""
Workbooks.Open FilePath & FileObj
For Each WS In ActiveWorkbook.Worksheets
WS.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
Next WS
Workbooks(FileObj).Close SaveChanges:=False
FileObj = Dir
Loop
End Sub
-
Close the editor.
-
Press Alt + F8.
-
Run MergeFiles.
-
Select the folder containing your Excel files.
When to Use Each Method
-
Copy Sheets: Works for simple workbook consolidation.
-
Power Query: Works for structured repeating tables or large datasets.
-
Copy and Paste: Works for partial data or mixed formats.
-
VBA: Works for automated batch merging.
Data Quality Checks After Merging
-
Validate column headers.
-
Check for duplicates.
-
Check for broken links.
-
Verify formulas recalculate properly.
-
Validate that all sheets or rows imported.
Let me know if you want me to create a ready-to-use macro tailored to your file structure or if you want instructions to merge by matching column headers.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to merge excel files into one file
Answers · 1
How to merge excel files into one
Answers · 1
How to mail merge from excel to email
Answers · 1
How to mail merge from excel to pdf
Answers · 1