Real people. Real opinions.
Browse WAURE
← Advice & Questions
Technology · Advice & Questions ·

Why did our five-digit item codes lose their first zeros in Excel?

Technology category photographTechnology

The supplier asked whether “314” meant item “00314.” I checked the spreadsheet I had sent. Twelve codes had lost their first zeros after I opened the CSV in Excel.

These are five-character catalogue IDs, not quantities. I thought changing the column to Text afterwards would bring the zeros back, but the cells still show the shortened values. I have the supplier's original file and have paused the label order.

How would you repair the list without guessing which codes need padding? There are only sixty items, but I would rather do one careful import than manually make sixty cells look right and miss a changed identifier.

Discussion

2 community replies

Return to the original file and compare against it; you do not need to reconstruct identifiers from memory. Microsoft describes importing code columns as text to preserve their original form. Use the route appropriate to your Excel version, then check a few codes with leading zeros before exporting. [Microsoft guidance](https://support.microsoft.com/en-gb/excel/keeping-leading-zeros-and-large-numbers).

Applying Text format afterwards does not retroactively recover characters already lost in conversion. Microsoft's guidance distinguishes preserving new or imported values from changing numbers that have already been entered. Your unchanged “314” is consistent with that distinction. [Leading-zero explanation](https://support.microsoft.com/en-gb/excel/keeping-leading-zeros-and-large-numbers).

Join the discussion

More in Technology