The fastest way depends on how your files are organized

If your Excel files have the same columns and you want to stack the data together, the quickest route is usually to copy and paste the data manually — but only if you have fewer than five files. For larger batches or files that update regularly, Power Query (built into Excel) can pull data from multiple files automatically and combine them in seconds.

The method you choose depends on three things: how many files you're combining, whether the files have identical layouts, and whether you need the combined file to update when the source files change. A one-time merge of three files is different from combining ten files that get new data every week.

Key Takeaways

  • Copy and paste works for small batches (under five files) when all files have the same column structure and you only need to do it once.
  • Power Query can automatically pull and combine data from dozens of files at once, and will update the combined file when source files change.
  • If files have different column layouts, you may need to rearrange columns before combining, or use a helper column to track which file each row came from.
  • Consolidate (under the Data menu) works when you want to sum or average data across files rather than stack rows together.

Copy and paste for a quick one-time merge

Open the first file and select all the data including headers. Press Ctrl+C (or Cmd+C on Mac) to copy. Create a new blank spreadsheet, paste the data starting at cell A1, then close the first file without saving.

Open the second file, select all data except the header row (since your new file already has headers), copy it, and paste it into your combined file starting at the first empty row below your existing data. Repeat for each additional file. This method works because you're only moving data, not creating formulas, so there's no risk of broken links if you move or rename the original files later.

The downside: if any of the original files get updated with new data, your combined file won't reflect those changes. You'd have to repeat the whole process. This is why copy-and-paste is best for one-time merges or data that doesn't change.

Power Query for automatic combining of many files

Power Query is the built-in tool in Excel that can combine dozens of files in minutes. It's available in Excel 2016 and later on Windows, and Excel 2016 and later on Mac (though the Mac version has fewer features). Open a blank spreadsheet, go to the Data tab, and select Get Data > From File > From Folder.

Navigate to the folder containing all your Excel files. Power Query will show you a preview of every file in that folder. Click Load, and it will combine all the data into a single table. If the files have the same columns in the same order, the data will stack automatically. If columns are in different orders, Power Query will still combine them correctly — it matches by column name, not position.

The real advantage of Power Query: if you add new files to that folder or update existing ones, you can refresh the combined file by right-clicking the table and selecting Refresh. All new data appears instantly. This makes Power Query the right choice for ongoing work where files change regularly.

When files have different column layouts

If one file has columns A, B, C and another has columns A, C, B, Power Query will still combine them correctly because it reads column names, not positions. However, if files have completely different columns — one has "Sales Region" and another has "Territory" for the same information — you'll need to standardize the column names first.

Open each file and rename columns so they match across all files. For example, change "Territory" to "Sales Region" in the second file before combining. This takes a few minutes but prevents confusion later. Alternatively, if you're using Power Query, you can rename columns after combining by right-clicking the column header in the Power Query editor and selecting Rename.

If you want to track which file each row came from (useful when combining files from different departments or time periods), add a new column to each file before combining. Call it "Source File" and fill it with the filename. When you combine the files, this column will show you where each row originated.

Using Consolidate to sum or average across files

If you don't want to stack rows together but instead want to add up or average numbers across multiple files, use the Consolidate tool. This is different from combining — it's for summarizing. For example, if you have monthly sales files and want a single total for the year, Consolidate can add them up automatically.

Create a new spreadsheet with the same row and column structure as your source files. Go to the Data tab and select Consolidate. Choose your function (Sum, Average, Count, etc.), then click Browse and select the data range from your first file. Repeat for each additional file. Consolidate will add or average the numbers and display the result in your new file.

The limitation: Consolidate works best when all files have identical layouts with data in the same cells. If one file has data in rows 2–50 and another in rows 2–75, Consolidate will still work, but you need to be careful about which cells you select.

Saving and organizing your combined file

Once you've combined your files, save the new spreadsheet with a clear name like "Sales_Combined_2024" or "All_Departments_Q1". Store it in a location separate from your source files so you don't accidentally overwrite it.

If you used Power Query, keep the original files in their folder — Power Query references them, so moving or deleting them will break the refresh. If you used copy and paste, the original files can go anywhere or be deleted; your combined file is independent.

Add a note at the top of your combined file showing the date it was created and which files it contains. If you plan to update it regularly, add another note explaining how to refresh (for Power Query) or when the last manual update happened (for copy and paste).

Troubleshooting common problems

Columns appear in the wrong order: If you used copy and paste, the order depends on the order you pasted. Rearrange columns in your combined file to match your preferred layout. If you used Power Query, the order matches your source files — rearrange columns in the source files and refresh.

Numbers appear as text: This happens when Excel interprets a column as text instead of numbers. Select the column, go to Data, and click Text to Columns. Click Next twice, make sure the column is set to "General" or "Number" format, and click Finish. Excel will convert the text to actual numbers.

Duplicate rows appear: If you pasted the same file twice by accident, delete the duplicate rows manually. If you're using Power Query and the same file appears twice in your folder, remove the duplicate file from the folder and refresh.

Power Query won't load: Make sure all files are in .xlsx format (not .xls or .csv). Power Query works best with Excel files. If you need to combine CSV files, convert them to .xlsx first or use copy and paste instead.

Frequently Asked Questions

Can I combine files that have different numbers of columns?

Yes. Power Query will include all columns from all files, leaving blank cells where a file doesn't have data for that column. With copy and paste, you can manually rearrange columns to match before pasting, or add empty columns to files that are missing them.

What's the maximum number of files I can combine?

Power Query can handle hundreds of files, though the time to combine them depends on file size and your computer's speed. Copy and paste works for any number, but becomes tedious above five or six files. For very large batches, Power Query is the better choice.

If I update a source file, does my combined file update automatically?

Only if you used Power Query. With copy and paste, you have to manually repeat the process. With Power Query, right-click the combined table and select Refresh to pull in any new or changed data from the source files.

Can I combine files from different folders?

Power Query's folder option combines all files in one folder. If files are scattered across multiple folders, move them to a single folder first, or use Power Query's "From File" option to select individual files one at a time and combine them manually.

What happens if I delete one of the original files after combining with Power Query?

The refresh will fail because Power Query can't find the file. Move deleted files to an archive folder instead of removing them, or create a copy of your combined file that doesn't depend on the original files by converting the Power Query table to static data (right-click and select Convert to Table).