A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
A regular paste can overwrite the destination cell formatting with the formatting from the source workbook. To keep the existing 00000 custom format, try:
- Copy the product codes.
- In the destination column, right-click the first cell.
- Select Paste Special > Values.
This pastes the underlying values without replacing the destination column’s custom number format. For example, a value of 123 should continue to display as 00123.
If the leading zeros are part of the actual product code rather than just its display, format the destination column as Text before pasting. Product codes are generally better stored as text because they are identifiers, not numbers used in calculations. Microsoft also notes that formatting cells afterward does not restore zeros that Excel has already removed.
You can find more information here: Keeping leading zeros and large numbers
If I misunderstood your question or if the suggested solution doesn't work, could you please share a sample of your data? I'll take a closer look and provide further assistance.
I look forward to your response.