Forum Discussion
Shilgirl
Sep 25, 2021Copper Contributor
Length of a number in an excel cell
I can't seem to type in some tracking numbers correctly. The number is correct for only so many characters and then it all changes to 0's so the number is never correct. It seems to be cutting off after so many characters and then placing 0's. I am using the cell for long tracking numbers that are all numbers. How do I get a long number to show correctly in a cell?
6 Replies
- PeterBartholomew1Silver ContributorWhat you call a 'number' is not numeric data at all (no one is going to ask you to divide it by 2 or extract a square root); it is merely a string of digits and should be treated as text. There may well be information encrypted into the strings but the operations that make sense would be of the form
= MID(trackingNumber, startLocation, stringLength)- ShilgirlCopper Contributor
That makes sense to me Peter. Frustrating but your comment is helpful. Thank you.
- Detlef_LewinSilver Contributor
Change the format of the cell to "Text". Then type the number.
As a variant type an apostrophe before the number.
- ShilgirlCopper ContributorWhen the cell is changed to "text" I get a weird number. I get 9.40011E+21
Here is the number I typed to text field... 9400111298370453148099. When the field is a number I get 9400111298370450000000.- Detlef_LewinSilver Contributor