A shop with three branches usually starts the same way. Each branch sends its sales file over LINE or email at the end of the month. Someone at head office opens the files one by one, pastes them into one sheet and builds a Pivot or SUMIF summary by branch and product. The first month it takes half an hour. With five branches and bigger files it takes half a day, and nobody is sure every row made it in.
This post compares four ways to combine several Excel files into one report, so you can pick the one that fits the number of files and the people on your team.
Before you start: make every file look the same
Whatever method you use, most problems come from files that do not match. Agree on one template with every branch first and the rest gets much easier.
- The same columns in the same order, with header names spelled exactly the same.
- Headers in the first row, with no shop-name row or blank rows above them.
- Dates stored as real dates, not text, all in the same calendar (Buddhist or Gregorian year, not both).
- Numbers without "baht" or other characters in the cell.
- A branch column, or file names that say which branch the file came from.
- No merged cells in the data area.
Way 1: copy and paste
Open each branch file, select all the data and paste it under the previous block in a combined sheet. Nothing to learn, and fine for two or three files now and then.
- Pros: works right away, everyone knows how.
- Cons: you redo it every month, nothing warns you about a missed or doubled paste, and the steps live in one person's head.
Way 2: Power Query in Excel
In Excel 2016 or later, or Microsoft 365, go to the Data tab, choose Get Data from Folder and point it at the folder with every branch file. Power Query appends all files into one table and adds a file-name column. Then use Group By for the totals. Next month, drop the new files into the folder and press Refresh.
- Pros: free if you already have Excel, repeatable with one button.
- Cons: takes time to learn, tied to one machine and folder path, limited in Excel for Mac and on the web, and when the person who built it leaves, nobody else can fix it.
Way 3: a VBA macro
Write code that opens every file in a folder and copies the data together. It can do almost anything, and one button runs it.
- Pros: the most flexible, can handle odd file layouts.
- Cons: you need to program, .xlsm files are often blocked by email and security tools, and when a column changes the code breaks with nobody knowing why.
Way 4: drag and drop on the web with the Join Canvas
If you do not want formulas or code, and you want the steps kept in one place others can open, use a web tool such as the Ruamhub Join Canvas. No database is needed: it works with the .xlsx or CSV files you already have.
- Upload each branch file (.xlsx or CSV, up to 50 MB per file).
- Drop the branch files on the canvas and connect them to a Union box to stack their rows (up to 10 inputs per Union). If the columns are in a different order, fix it with a Select box first.
- Add a Group by box for totals, bill counts or averages by branch and product.
- Need product names or costs from a product list file? Use a Join box instead of VLOOKUP.
- Preview the first 100 rows, then send the result as Excel or PDF by email, or keep it in the app to download.
Next month, upload the new files, point the file boxes on the canvas at them and press Run. The Union, Group by and Join steps are all still there.
- Pros: no formulas or code, the steps are visible, teammates can open and run it, and it is not tied to one computer.
- Cons: the files have to be uploaded, and the Free plan has 1 pipeline and 30 runs a month.
Which one to pick
- Two or three files, now and then: copy and paste, but write the steps down.
- Excel 365 and someone on the team who likes it: Power Query.
- Unpredictable file layouts and a programmer to look after it: VBA.
- A whole team sharing it, not tied to one person, with the report sent as Excel or PDF: the Join Canvas.
Common mistakes after combining files
- Totals too high: usually a file sent twice. Compare the combined row count with the sum of each file's rows.
- One product on two lines: a trailing space or different capitalisation in the name or code.
- Some days missing: dates stored as text, so the date filter cannot see them.
- A whole branch missing: that branch's header names are spelled differently.
See the step-by-step guide to retiring the weekly VLOOKUP report →