Customer list cleaned
Repeated entries, mixed dates and amounts — cleaned with every change recorded.
Change log · Removed repeats · Trace these rows
550 entries: 472 kept · 65 repeats removed · 13 saved for review.
Case 01 of 8 in Excel & VBA casebook
What was wrong
- The same customer entry appeared with different spacing, capitalization and date formats.
- Amounts mixed currency signs, thousands separators and brackets for negatives.
- Impossible dates and unreadable amounts needed review before the list could be used.
What I did
- I made dates and money amounts consistent and preserved customer numbers, including starting zeros.
- I removed a repeat only when the customer number, name, date and amount all matched after cleanup.
- I kept a record of every removed repeat and saved doubtful entries separately with the reason they need review.
- I checked every entry and the money totals, then ran the cleanup again to confirm the result stays the same.
Proof
- Every entry accounted for: 550 source entries = 472 kept + 65 repeats removed + 13 saved for review.
- Money accounted for: 220,259.68 in valid entries = 194,075.70 kept + 26,183.98 in removed repeats. Entries needing review are kept separately and excluded from these totals.
- Stable result: running the cleanup again makes no further changes.
The picture shows the opening entries before cleanup and the cleaned list afterwards. The repeated Account N-01 entry is gone; Account W-01 moves up. Matching also checks the customer number, date and amount. Trace the pictured entries · Larger before view · Larger after view.
Download the .xlsx workbooks: original list · cleaned list with review tabs · copy checked in LibreOffice.
Follow any change: what changed · removed repeats and the entries kept · entries needing review · decision for every entry.
Developer details: reproduce the results and inspect the checks
Try it yourself
Optional technical check for a developer: from this case folder, with Docker running:
./run.sh
This rebuilds the cleaned workbook in output/, runs the checks and prints PASS. Developer setup and input requirements.
How it is tested
The verification record is a historical run; its source hashes identify that snapshot, not the current rendering/page sources.
- 37 tests check date order, identifiers, invalid values, duplicate links, changed inputs and exact record/money totals.
- Executed checks verify repeatability, unchanged sources and every sheet’s values after a LibreOffice load/export; folder names containing spaces also passed.
- The .xlsx workbooks were produced and checked with Python 3.12.3, openpyxl 3.1.2, LibreOffice 24.2.7.2 and pytest 7.4.4.
More rows or pages: I quote the difference in writing before I start.
Contact me through the platform where you found this case.