Google "excel limitations" without quotes (click here):
Note: The red-circled items are data-entry limits, not "calculation" limits.
These limitations are arbitrary. If you want to use the 16- and 17-digit numbers in arithmetic, you can use a VBA function to enter them. Namely:
Function vbvalue(x) As Double
vbvalue = x
End Function
Usage: =vbvalue("1234567890123456")
Excel still displays the value incorrectly because it formats only up to 15 significant digits.
But most 16-digit integers (up to 9007199254740992) can be represented exactly internally.
Beyond that, precision can be lost due to the limitations of 64-bit binary floating-point, which is how Excel and most applications represent numbers internally.
For example, =vbvalue("12345678901234567") results in the integer 12345678901234568 .
-----
However, if the long "numbers" are really IDs that will not be used in arithmetic, it is better to enter them as text.
There are several ways, depending on how you are entering them.
Since you mentioned that you "type" the number, format the cell as Text first, or prefix the number with an apostrophe (single-quote). For example, type '12345678901234567 .