XL AI Automation
Home › Guides › How to merge multiple Excel files into one

How to merge multiple Excel files into one

7 min read · Updated 4 December 2026

Every month you receive one file per branch, or one file per month, and you need them in a single sheet before you can build a pivot. Here are the ways to do it, from quick to fully automatic.

Method 1: Copy and paste (fine for 2 or 3 files)

  1. Open the first file and copy the data including the heading row.
  2. Paste it into a new sheet.
  3. From every other file, copy the data without the heading row and paste below the last row.
  4. Add a column such as Branch so you know where each row came from.

The risks: columns in a different order in one file, missed rows, and pasting the heading row again. It also has to be redone every month.

Method 2: Power Query "From Folder" (automatic)

  1. Put all the files in one folder, and nothing else.
  2. In Excel: Data → Get Data → From File → From Folder, and select the folder.
  3. Click Combine → Combine & Transform Data, and choose the sheet to use from the sample file.
  4. Power Query adds a Source.Name column with the file name. Keep it to track the branch.
  5. Click Close & Load.

Next month, replace the files in the folder and click Refresh All.

Watch out for these

  • Title rows above the headings (company name, report name): in Power Query use Remove Top Rows, then Use First Row as Headers, inside the "Transform Sample File" query so it applies to every file.
  • Different heading names such as "Party Name" in one file and "Customer Name" in another: Power Query treats them as separate columns. Rename them to match before combining.
  • Total rows at the bottom of each file get merged too. Filter them out before loading.
  • Dates and amounts stored as text: see how to convert text to dates.