Our Cost Price Workbook Gave Every Product Missing From a Supplier's List the Price of the Product Above It
Every January our suppliers send new price lists, and our buyers update our cost prices before we load them into the trading system. For one large insulation and drylining supplier they used a workbook built around 2015 and copied every year since. Our product list sat on one sheet, the supplier's new list was pasted onto another, and a VLOOKUP brought each product's new cost across by the supplier's code.
The formula left out its last argument. Without it, VLOOKUP does not look for an exact match. It assumes the first column is sorted and returns the row with the largest code that is not greater than the one it was asked for. When a code is missing, it does not show an error. It quietly returns the cost of whatever product would have sat just above it. The supplier's list was sorted by code, which is the condition approximate matching needs, so for years the workbook worked well enough to hide the problem.
In January 2025 that supplier renumbered part of its range and discontinued other lines. Two hundred and twelve of our products were not on the new list. Each one took its neighbour's cost, usually a similar product in a different size, so nothing looked absurd when a buyer scrolled down the sheet. A hundred millimetre insulation board took the cost of the fifty millimetre board. Our selling prices follow cost, and thirty eight products went out below what we paid for them.
The margin review in March found it, because the margin on that supplier's range had fallen by four points. Over nine weeks it had cost us about eighteen thousand pounds. Fourteen of our other buying workbooks used the same formula.
Every lookup now asks for an exact match, with the last argument set to FALSE or with XLOOKUP, which matches exactly unless told otherwise. A missing code now shows as an error, and a count of errors sits at the top of each sheet. Cost updates no longer go through workbooks at all. The trading system's import refuses any product it cannot match and lists every change above fifteen percent for a buyer to approve.
A lookup that cannot find an answer should say so. Anything that fills a gap with a guess will look right in exactly the places where it is wrong.
– Serguey Shinder