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)
- Open the first file and copy the data including the heading row.
- Paste it into a new sheet.
- From every other file, copy the data without the heading row and paste below the last row.
- 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)
- Put all the files in one folder, and nothing else.
- In Excel: Data → Get Data → From File → From Folder, and select the folder.
- Click Combine → Combine & Transform Data, and choose the sheet to use from the sample file.
- Power Query adds a Source.Name column with the file name. Keep it to track the branch.
- 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.