The fastest way depends on file size and how your data is organized
Merging Excel files means combining data from two or more separate spreadsheets into a single file. The method you choose depends on whether you're stacking rows of similar data, combining columns side by side, or pulling specific information from multiple sources. For small files with simple layouts, copy-and-paste works. For larger files or repeated merges, Excel's built-in tools like Power Query or consolidation features save time and reduce errors.
The three most common approaches are manual copying, using Excel's Consolidate feature, and using Power Query. Each handles different situations — manual copying works for one-time small merges, Consolidate works when your files have identical layouts, and Power Query handles complex merges and can be saved for repeated use.
Key Takeaways
- Copy-and-paste works for small files but requires you to manually arrange data and watch for duplicate headers.
- Excel's Consolidate feature (on the Data tab) automatically combines data from multiple files if they have the same column structure and labels.
- Power Query lets you load data from multiple files at once and combine them with a few clicks, and you can save the process to repeat it later.
- Before merging, check that column headers match across files and remove any extra blank rows or columns that will confuse the merge.
Copy and paste for small, one-time merges
If you have two or three small files and only need to merge them once, copying and pasting is the simplest approach. Open the first file, select all the data (including headers), and copy it. Open a new blank spreadsheet, paste it, then open the second file and copy its data below the first set.
The main thing to watch for is duplicate headers. If each file starts with a header row (like "Name", "Date", "Amount"), you'll end up with headers in the middle of your merged data. Delete the extra header rows after pasting so your data stays clean. Also check that the columns line up — if one file has columns in a different order, you'll need to rearrange them before pasting.
Use Consolidate when files have identical layouts
Excel's Consolidate feature is built for merging files that have the same structure — the same column headers in the same order, and data organized the same way. Open a new blank spreadsheet, go to the Data tab, and click Consolidate (you may need to look under "Data Tools" depending on your Excel version).
In the Consolidate dialog, choose the function you want — Sum, Average, Count, or others depending on what you're doing. Then click "Browse" next to "Reference" and select the data range from your first file (for example, Sheet1!A1:D100). Click Add, then repeat for each additional file. Make sure "Use labels" is checked if your data has headers. Click OK, and Excel combines all the data automatically.
This method works best when all your files have identical column names and the same number of columns. If one file is missing a column or has columns in a different order, Consolidate will misalign the data.
Power Query for complex merges and repeated use
Power Query is Excel's tool for loading and combining data from multiple sources. It's more powerful than Consolidate and lets you clean and reshape data as you merge. Open a blank spreadsheet, go to the Data tab, and click "Get Data" (or "New Query" in older Excel versions). Choose "From File" and then "From Folder".
Select the folder containing all your Excel files. Power Query loads a preview of all files in that folder. Click "Combine & Load" or "Combine & Transform" (the exact button name varies by version). Power Query asks which sheet to use from each file and whether to use headers. After you confirm, it merges all the files into a single table in your spreadsheet.
The advantage of Power Query is that you can save these steps. If you need to merge the same files again next month with new data, you can refresh the query instead of repeating the whole process. You can also filter, remove columns, or rename headers before the final merge, all without touching the original files.
Prepare your files before merging
Before you merge, spend a few minutes checking each file so the merge goes smoothly. Open each file and look at the column headers — they should match exactly across all files. If one file says "Date" and another says "Date Entered", the merge won't recognize them as the same column.
Delete any blank rows or columns at the top or bottom of each file. These confuse merge tools and create gaps in your final data. If one file has extra columns you don't need, you can delete them now or remove them after the merge — either way works, but removing them before is cleaner.
Also check that your data types match. If one file has dates formatted as "01/15/2024" and another has "January 15, 2024", they're the same information but formatted differently. This usually isn't a problem for merging, but it can cause issues if you later sort or filter by date.
Combine files with different structures using manual steps
If your files don't have the same layout — for example, one has customer names and one has order amounts, but they're organized differently — you'll need to rearrange them first or use a more manual approach. Open each file and create a new sheet with a consistent structure that matches across all files. Copy the data into this standardized format, then merge using one of the methods above.
Alternatively, if the files are related by a common column (like customer ID or date), you can use Excel's VLOOKUP or INDEX/MATCH functions to pull data from one file into another without physically merging them. This keeps the files separate but lets you see all the information together. This approach takes longer to set up but is useful if you need to update the original files regularly.
Save your merged file and keep originals
After merging, save your new file with a clear name that shows it's a combined version — for example, "Sales_2024_Combined" instead of just "Data". Keep your original files in a separate folder so you have a record of where the merged data came from.
If you used Power Query, the merged data is linked to the original files. If you update the original files and refresh the Power Query, the merged file updates automatically. If you used copy-and-paste or Consolidate, the merged file is a snapshot — changes to the original files won't show up in the merged version unless you manually update it.
Frequently Asked Questions
What if my files have different numbers of columns?
Consolidate and Power Query both handle this, but they treat missing columns differently. Consolidate ignores columns that don't exist in all files. Power Query includes all columns and leaves blank cells where data is missing. For copy-and-paste, you'll need to manually rearrange columns so they line up before pasting.
Can I merge files from different folders?
Yes. With copy-and-paste, open each file individually and copy from it. With Consolidate, you can browse to any file location when you add references. Power Query's "From Folder" method only works if all files are in the same folder, but you can manually add files from different locations by clicking "Add" multiple times in the Consolidate dialog.
Will merging remove duplicate rows?
No — Consolidate, Power Query, and copy-and-paste all keep duplicate rows. If two files both contain the same customer or transaction, you'll see it twice in the merged file. After merging, you can use Excel's "Remove Duplicates" feature (on the Data tab) to clean this up, but you'll need to tell Excel which columns to check for duplicates.
What's the largest file size Power Query can handle?
Power Query can handle files with hundreds of thousands of rows, but performance depends on your computer's memory and the complexity of your merge. If you're merging very large files and the process is slow, try removing unnecessary columns before the merge or splitting the files into smaller batches.
Can I undo a merge if something goes wrong?
If you used copy-and-paste or Consolidate, press Ctrl+Z (or Cmd+Z on Mac) immediately after the merge to undo. If you saved the file, you can't undo — open the original files instead. With Power Query, you can edit the query steps or delete the merged table and start over without affecting your original files.