LONG IDENTIFIERS

Keep long ID numbers intact in Excel

Preserve every character in long reference numbers. Learn why widening a column cannot recover digits lost during numeric conversion.

In this guide

Import long reference numbers as Text, even if every character is a digit. Excel numbers have a limit of 15 significant digits. An identifier with more digits should not be stored as a number if you need to preserve it exactly. Microsoft's explanation of long numbers

A wider column or a different display format cannot restore digits that were lost in a numeric conversion. Start again from the intact source.

Two IDs that must stay different

Download identifier-practice.csv. These are fictional reference numbers, not bank, identity or customer records.

row_idreference_idWhat to check
CASE-01123456789012345671Ends in 671
CASE-02123456789012345679Ends in 679
CASE-03000123456789012345Three leading zeros
CASE-04123456789012345A 15-digit comparison
CASE-05REF-2026-00005A mixed letter-and-digit ID
CASE-06EmptyNo reference supplied

The first two values differ only near the end. Looking at the first few digits is not enough to verify them. A shortened display can hide the difference, while numeric conversion can actually destroy it.

Import once, then investigate precision

Use the shared identifier import procedure. It covers this same six-record download: select UTF-8 and Comma, then set both product_code and reference_id to Text before loading. If you already completed that exercise, keep the workbook and continue with column C below; you do not need a second import.

The original Excel for Mac 16.112.2 test preserved all six reference values, including the blank. It used the Chinese interface with the English control names translated in the shared procedure. The documented Power Query alternative was not tested for these identifier fixtures.

Separate a display problem from lost digits

ObservationWhat to compareDecision
A short value appears in scientific notationFull formula-bar value against the untouched sourceWiden the column only if all digits still agree
An 18-digit value has the right lengthBoth complete reference strings, especially 671 versus 679Length alone cannot approve the result
Two distinct source IDs look identical after importCASE-01 and CASE-02 in column CReimport both from the intact CSV as Text; do not deduplicate them
The source export already contains rounded suffixesThe source file outside ExcelObtain an intact source export before continuing

Precision loss can turn a later lookup into a false match. In this sample the first two references must remain distinct even though their first 17 characters are the same. Do not use a numeric equality check to decide whether they identify the same record.

Check all the characters

With the sample headers on row 1, C2 should be 123456789012345671 and C3 should be 123456789012345679. Select each cell and inspect the full value in the formula bar.

Optional checks in unused cells are:

=EXACT(C2,"123456789012345671")
=EXACT(C3,"123456789012345679")
=ISTEXT(C2)
=LEN(C2)

Expected results: TRUE, TRUE, TRUE and 18. The quotes around the expected ID in these formulas matter: they make the comparison target text rather than another numeric conversion. Function names and argument separators can vary by Excel language and region.

Then verify that C4 still starts with 000, the alphanumeric ID is unchanged, and the final reference is blank. These edge cases help catch an overbroad “convert everything to numbers” step.

Recognize a wrong result

For this fixture, 123456789012345671 and 123456789012345679 must remain different strings. A result such as 123456789012345000 fails even though its length is still 18. Do not use LEN alone as the acceptance check.

Place the four optional formulas in separate empty cells outside A:D. If EXACT is FALSE, compare the original downloaded file with the formula bar before editing anything. Reimport from the source if Excel already changed the digits; manually filling in a plausible suffix is not a repair.

Scientific notation does not prove damage

Seeing 1.23457E+14 is a display observation, not by itself proof that the stored value changed. Inspect the full value and compare it with the source. A short number may simply need a wider column or an appropriate display format.

An 18-digit identifier that was converted into an Excel number has a different problem: the numeric representation cannot preserve all significant digits. Changing its format later cannot reconstruct the original suffix.

Recover from an intact source

Close the altered copy without overwriting the original export. Obtain the original CSV again, import the identifier column as Text, and verify the complete strings.

If the source system already supplied rounded numbers, request a fresh export that preserves identifiers as strings. Do not guess suffixes or copy missing digits from an unrelated record. If two distinct IDs collapsed to the same numeric value, the altered workbook alone cannot tell you which was which.

A final handoff check

For this sample, confirm six data records and four columns, then check the exact values above. If you export to CSV, import that exported file again with the recipient's intended settings. CSV carries characters and field boundaries, not Excel column-type metadata.

For shorter codes whose first zeros disappear, read Keep leading zeros when importing a CSV. For garbled names and descriptions, use the text encoding guide.