Combine monthly shop files
Separate shop spreadsheets, with columns in different orders. Bring them into one table, then refresh without doubling the figures.
50 files: 46 filled, 2 empty, 2 rejected. 1 temporary file ignored, outside the 50.
Two entries from the finished table, with their original source rows. Download the finished spreadsheet.
Case 8 of 8 in Excel & VBA casebook
What was wrong
- Each shop’s monthly figures are in a separate spreadsheet.
- The columns moved around, so copying and pasting could put figures in the wrong place.
- Empty files and files with missing columns needed attention before they could be included.
What I did
- I matched columns by their names, keeping the extra details some shops supplied.
- I kept the original filename and row number beside each entry so it could be checked.
- I listed files that needed fixing, instead of silently losing them.
- I set up a repeatable update and checked that adding a file brings in its entries once.
Proof
The opening table shows one entry from each of the first two shop files, with their original values retained. Open the full combined spreadsheet to see all 5,520 rows.
| What was checked | What happened |
|---|---|
| All the shop files | 50 files: 46 filled, 2 empty, 2 needing fixes |
| Files needing fixes | One is missing the amount column; one is missing the data sheet |
| Temporary editing file | 1 ignored; separate from the 50 shop files |
| Entries brought together | 5,520 rows; amounts add up to 238,441.92 |
| Update again | Still 5,520 rows, with every value unchanged |
| Add a file containing another entry | 5,521 rows, matching the enlarged source folder |
Download: original shop files · finished spreadsheet · files needing attention · workbook with the update macro.
Watch the recorded refresh replay

Replay of the recorded refresh log, rather than an application screen recording. Still image.
Developer details: reproduce the results and inspect the checks
Try it yourself
Optional technical check for a developer, from this folder with Docker running:
./run.sh
It starts in a fresh results folder, keeps the sources read-only, checks the results and prints PASS: combine checks plus the results path. Developer setup and file requirements.
How it is tested
Run in: LibreOffice Calc 24.2.7.2 (headless), the macro checked against an independent Python reference.
Passing tests check row counts, amount totals, every source value and unchanged input files. They cover reordered columns, extra fields, empty and invalid files, temporary files, repeat updates and a newly added file. The actual VBA run matched the reference cell by cell; its saved workbook used UNO export rather than VBA SaveAs.
The refresh animation is a replay of events captured around those macro calls, not an application screen recording. The run starts with an empty table. It refreshes twice, then refreshes a temporary copy of the source folder with one extra entry. Every result is compared with the Python reference. Launcher tests use a Docker command double to check read-only mounts and fresh destinations; the full demo pipeline is also run in a fresh folder inside the Linux container.
For the developer checking the implementation: tests · VBA source · versions and execution evidence.
£39 fixed as one task automated, 5 working days. This covers one shared folder-to-table setup across your shops. I confirm the files and layout through the platform before starting.
Contact me through the platform where you found this case.
For work beyond that setup, I quote any difference in writing before I start.