Cleaning up messy inventory data without breaking your stock numbers
Published 2026-10-14.
Why inventory cleanup is not spreadsheet cleanup
A household spreadsheet can survive an enthusiastic cleanup. An item file cannot. It is not just a list of products: it carries quantities on hand, cost, price, and the sales history that makes reorder decisions possible. Delete the wrong duplicate and you have not tidied the file, you have quietly changed what the store believes it owns. That is why the cleanup below is sequenced like a small operation, with a backup, an inspection stage, and a proof at the end that the stock numbers are exactly what they were at the start.
The principle underneath, and it applies to every messy dataset a store keeps, is that unknown or unverified data should not be entered, merged, or deleted until it has been cleaned up and understood. Acting on dirty data first and cleaning later just moves the mess downstream, where it is more expensive to find.
Step 1: freeze a copy, and take the before picture
Export the item file and save one copy untouched, somewhere the cleanup will never reach. Every later step happens on a working copy. Then record the before picture: total units on hand, total inventory value, and the count of item records. Three numbers, written down. They are your proof at the end. If the cleaned file cannot reproduce the first two exactly, something was merged or deleted that should not have been, and the untouched copy is how you recover.
One technical warning belongs here, because it corrupts more imports than any other: codes with leading zeroes must be treated as text. A catalogue-checking guide makes the point concretely: open a code column as numbers and a code like 00127 becomes 127, a different code that no longer matches the shelf label. Long numeric identifiers deserve the same care.
Step 2: find the duplicates, but delete nothing yet
Decide, in writing, what a duplicate means in your store: the same SKU on two records. Not the same title, because two different products can share a sloppy title, and not the same barcode alone, because variants sometimes legitimately share packaging. Decide also whether letter case matters in your system and whether trailing spaces count, because a code with a stray space is a duplicate wearing a disguise.
Then inspect before touching anything. A count formula does this safely: count how many times each SKU value appears, and look only at the values counted more than once. Spreadsheet-cleaning practitioners give the same advice in general form: a count greater than one flags a value to investigate, and deleting first and investigating later is not cleaning, it is gambling. The next step decides what each flagged pair actually is.
Step 3: classify each duplicate before resolving it
Every duplicate pair is one of three things, and each has a different fix:
- A true duplicate: the same item entered twice. Merge into one record, add the quantities together, keep the record with the better data, and retire the other.
- Two different items sharing one SKU by mistake. The fix is a new SKU for one of them, assigned deliberately and relabelled on the shelf the same day, not a deletion.
- An intentional shared code, used by some workflows on purpose, for example a generic code for a class of small items. Leave it, but write down that it is intentional so the next cleanup does not re-litigate it.
Step 4: standardise the labels with a mapping table
The second disease in a messy file is one thing wearing many names: a supplier or category recorded four ways is four categories to every report. The safe fix is a mapping table: list each variant spelling beside the one standard value, then apply the mapping with a lookup formula that returns the original value when no mapping exists, so nothing is silently blanked. This beats find-and-replace marathons, because the mapping table is reviewable before it is applied, reversible after, and reusable at the next cleanup.
Apply the same pass to numbers stored as text, the third quiet disease. The symptoms are recognisable: values hugging the left of the cell, sums that skip them, sorting that puts 100 before 20. Convert them deliberately, in the working copy, and spot-check totals as you go.
Step 5: reconcile, then go live
Before the cleaned file replaces the live one, prove the operation changed structure and not substance: total units on hand and total inventory value must match the before picture exactly, and the record count should have fallen by precisely the number of true duplicates you merged, no more. Any unexplained difference stops the go-live, full stop. That is what the untouched copy and the three numbers were for.
Do the cleanup when the store can verify it: right after a stock count is the ideal moment, because the physical numbers were just confirmed. And schedule the light version quarterly. Messy data is not a character flaw, it is entropy; the stores that beat it are the ones whose cleanup is a routine with a backup and a reconciliation, not an annual emergency.
Worked example: three records, one jumper
A real cleanup decision, in miniature. The item file holds three records a count flags as sharing one SKU. The first carries a quantity of four and two years of sales history. The second, created during a busy receiving day, carries a quantity of two, no sales, and a price keyed a cent lower. The third turns out, when somebody walks to the shelf, to be a different colour of the same jumper that was given the same code because the label printer was down that afternoon.
The decisions follow the classification, not the software. Records one and two are a true duplicate: the quantities add, four plus two, the surviving record is the one with the history and the correct price, and the empty duplicate is retired, not deleted, so the audit trail shows where its stock went. Record three is the dangerous one: it looks like the same duplication and is actually a distinct item wearing the wrong identity. It gets a new SKU of its own, a corrected shelf label the same day, and its quantity stays exactly where it was, because merging it would have invented a stock figure for a product the store does not separately sell and understated a product it does.
Now the reconciliation earns its keep. Before the cleanup: three records, and a total on-hand for the jumper family that the shelf count confirms. After: two records, the same total, the same value, and a record count that fell by exactly the one true merge. If any of those numbers had moved, the example stops being a tidy story and becomes a stop sign, which is precisely what the before picture is for.
FAQ
My system will not let me merge records. Then retire the duplicate properly instead: zero its quantity only after transferring that quantity to the surviving record, mark it inactive rather than deleting it, and note the surviving SKU on it. History stays auditable and the counts stay true.
How long should this take? For a few hundred items, an afternoon, most of it spent on step 3 decisions rather than mechanics. Those decisions are the cleanup; the spreadsheet work is the easy part.