Join customers only with approval
A typo and “Ltd” versus “Limited” can hide a repeated customer. The saved approval below authorises this join.
Open the approval record: C0403 → C0003. Old number → number to keep. Without that approval, these entries stay separate.
480 entries became 440. Only the 40 approved pairs were joined; every original entry is recorded.
Case 03 of 8 in Excel & VBA casebook
What was wrong
- Spelling mistakes and shortened names made the same customer appear more than once.
- Similar names could also belong to different customers.
- Joining them by name alone could combine the wrong customers.
What I did
- I listed possible matches with a reason beside each pair.
- I made each join depend on approval: the old customer number and the customer number to keep.
- I kept the chosen customer’s details and recorded what happened to every original entry.
- I made incorrect approvals stop the changes, with a list of what needs correcting.
Proof
| Check | Result |
|---|---|
| Starting list | 480 customer entries |
| Suggestions to review | 79 pairs |
| Approved joins | 40 pairs |
| Finished list | 440 customer entries |
| Suggestions left separate | 39 pairs without approval |
| Original entries accounted for | All 480; none lost |
The North/South pair stays separate, even though its names are close. The opening picture shows a typo and Ltd/Limited spelling difference, the exact confirmation row and the resulting audit entry. To approve a join, save the old number and the number to keep in the approval list, then rerun against the original register. You can also approve a match that the suggestions missed; the approval checks still apply.


Download the .xlsx workbooks: before · after · checked copy.
Review files: approval list · blank approval list · record of every original entry.
Developer details: reproduce the results and inspect the checks
Try it yourself
Optional technical check for your developer. With the repository and Docker ready, run this from the case folder:
./run.sh
It rebuilds the .xlsx workbooks and prints PASS or FAIL. Open output/result.xlsx for the result. Setup, your own files and how suggestions are selected.
How it is tested
- Tests check that every entry is accounted for, unapproved pairs stay separate and repeated runs give the same result. Recorded results.
- Incorrect approvals must leave the whole customer list unchanged, including conflicting choices and circular links.
- The .xlsx workbooks were produced with Python 3.12.3 and openpyxl 3.1.2, then checked with LibreOffice 24.2.7.2. Every sheet’s values were compared after reopening and saving.
£45 fixed, up to 5,000 rows, the confirmed list with every merge logged, 3 working days. Contact me through the platform where you found this case.
More rows or pages: I quote the difference in writing before I start.