We are using windows 11 on a PC. When we try to type a 16 digit number - Microsoft Community

We are using windows 11 on a PC. When we try to type a 16 digit number into a cell, the last digit always changes to a 0. A 15 digit number doesn't change

When we try to type a 16 digit number into a cell in excel, the last digit always changes to a zero. If we type a 15 digit number into a cell the number stays as typed. If we type a 17 digit number the last two digits change to 00.

* Changed to a question & moved from Win 11/Performance

|

Google "excel limitations" without quotes (click here):

Image

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 .

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated May 11, 2024 Views 25 Applies to: