Why sorting two inventory exports can give you false changes
Last week’s export starts with SKU 00123. This week’s starts with 00789. Comparing the first row of each file tells you that two rows differ, but not whether either product changed. A new item or a missing item can shift every row below it. Sorting both files does not fix that.
Match the item before comparing the quantity
Start with the previous export and the new export. Read sku as text: 00123 is an identifier, not the number 123. Check that each nonblank SKU appears only once on each side. If one item can appear in two warehouses, use SKU and warehouse together instead. A blank or duplicated key needs a decision, not a guess.
| SKU | Previous | New | What happened |
|---|---|---|---|
| 00123 | 7 | 8 | Quantity changed. |
| 00456 | 2 | — | Only in the previous export. |
| 00042 | — | 5 | Only in the new export. |
| 00789 | 6 | 6 | No change; the row only moved. |
Check the totals before sharing
A missing record is not the same as a quantity of zero. The expected changes file contains three records, not four. Each input has three items, and one item stayed the same.
In a spreadsheet, use a full outer merge on the key: keep unmatched records from both lists, compare quantities on matched records, then filter out equal matches. Resolve blank or duplicate keys before you compare.