# Entering a 20 digit number in Excel?

**URL:** <https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798>\
**Category:** Factual Questions\
**Created:** [March 24, 2006, 11:29pm UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798 "2006-03-24T23:29:50Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![xash](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xash](https://boards.straightdope.com/u/xash)\
**Post date:** [March 24, 2006, 11:29pm UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/1 "2006-03-24T23:29:50Z")

</div>

I’m trying to enter a 20 digit number in MS Excel (2003 XP2/ WinXP).

When I enter:

12345678901234567890

Excel truncates it to:

1.23457E+19 or 12345678901234500000

I tried changing “Format Cells” to Text, Custom, Number, etc. No dice.

Any ideas?

---

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [March 24, 2006, 11:50pm UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/2 "2006-03-24T23:50:37Z")

</div>

If you want it to be treated as a number, I think you’re out of luck. Like most programs, Excel has an upper limit on the accuracy (number of digits) allowed and it isn’t 20. If you just want the entry 12345678901234567890 to display (and be treated like a text string, then you can enter '12345678901234567890. That is, precede it with a single quote. I’m not sure what the upper limit on the length of a string, but it’s at least 100 characters long.

---

<div class="post-metadata">

**Author:** ![kanicbird](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@kanicbird](https://boards.straightdope.com/u/kanicbird)\
**Post date:** [March 24, 2006, 11:55pm UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/3 "2006-03-24T23:55:04Z")

</div>

Did you try to expand the column size so that your number fits?

---

<div class="post-metadata">

**Author:** ![kanicbird](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@kanicbird](https://boards.straightdope.com/u/kanicbird)\
**Post date:** [March 24, 2006, 11:59pm UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/4 "2006-03-24T23:59:53Z")

</div>

Format your cell to text before you enter the number

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [March 25, 2006, 12:03am UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/5 "2006-03-25T00:03:28Z")

</div>

**OldGuy** has it. A bit of Googling turned up [this article](http://www.cpearson.com/Excel/rounding.htm), which explains things more fully and says that the limit on precision is about 15 digits.

---

<div class="post-metadata">

**Author:** ![kanicbird](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@kanicbird](https://boards.straightdope.com/u/kanicbird)\
**Post date:** [March 25, 2006, 12:16am UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/6 "2006-03-25T00:16:46Z")

</div>

> [@Thudlow Boink](#):
>
> **OldGuy** has it.

um… I just did it, and just like I said format the cell(s) to text before you enter the number.

---

<div class="post-metadata">

**Author:** ![Baffle](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@Baffle](https://boards.straightdope.com/u/Baffle)\
**Post date:** [March 25, 2006, 12:34am UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/7 "2006-03-25T00:34:44Z")

</div>

The limit of precision is in fact 15 digits. When I enter 12345678901234567890 into my Excel it becomes this:

12345678901234500000

It doesn’t even round accurately, how nice.

---

<div class="post-metadata">

**Author:** ![xash](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xash](https://boards.straightdope.com/u/xash)\
**Post date:** [March 25, 2006, 3:48am UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/8 "2006-03-25T03:48:49Z")

</div>

> [@Baffle](#):
>
> The limit of precision is in fact 15 digits. When I enter 12345678901234567890 into my Excel it becomes this:
> 
> 12345678901234500000
> 
> It doesn’t even round accurately, how nice.

Yeah, you see, this friend of mine who be Prince of Nigeria want to send me his all money fast fast and I don’t want to lose US$$67890. I have to sends him excel sheet with my bank all details.

> [@kanicbird](#):
>
> um… I just did it, and just like I said format the cell(s) to text before you enter the number.

That did it! I was trying to format it to Text _after_ entering the number. Thanks, **kanicbird**.

---

<div class="post-metadata">

**Author:** ![kanicbird](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@kanicbird](https://boards.straightdope.com/u/kanicbird)\
**Post date:** [March 25, 2006, 1:14pm UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/9 "2006-03-25T13:14:13Z")

</div>

> [@xash](#):
>
> Yeah, you see, this friend of mine who be Prince of Nigeria want to send me his all money fast fast and I don’t want to lose US$$67890. I have to sends him excel sheet with my bank all details.

And to think that I was worried that you were tallying up my S.D. demerits.  
😃

---

<div class="post-metadata">

**Author:** ![spingears](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@spingears](https://boards.straightdope.com/u/spingears)\
**Post date:** [March 25, 2006, 3:54pm UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/10 "2006-03-25T15:54:12Z")

</div>

> [@xash](#):
>
> I’m trying to enter a 20 digit number in MS Excel (2003 XP2/ WinXP).  
> When I enter:12345678901234567890  
> Excel truncates it to:1.23457E+19 or 12345678901234500000

Just curious.

Why do you need to enter a 20 digit number into a spread sheet?

The long sequence is meaningless in practical applications.

Even the mantissas of logarithms are not carried that far.

Or like memorizing the long digit sequence for “Pi.”

Why?

---

<div class="post-metadata">

**Author:** ![hajario](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hajario/32/171_2.png) [@hajario](https://boards.straightdope.com/u/hajario)\
**Post date:** [March 25, 2006, 4:29pm UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/11 "2006-03-25T16:29:40Z")

</div>

> [@kanicbird](#):
>
> Format your cell to text before you enter the number

You don’t even have to do that. Just put an apostrophe before the number when you enter it and it will make it into text.

'12345678901234567890

---

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [March 26, 2006, 12:01am UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/12 "2006-03-26T00:01:52Z")

</div>

> [@hajario](#):
>
> You don’t even have to do that. Just put an apostrophe before the number when you enter it and it will make it into text.
> 
> '12345678901234567890

Which was the very first response to the thread

---

<div class="post-metadata">

**Author:** ![xash](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xash](https://boards.straightdope.com/u/xash)\
**Post date:** [March 26, 2006, 8:32am UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/13 "2006-03-26T08:32:23Z")

</div>

> [@OldGuy](#):
>
> Which was the very first response to the thread

:smack: For some strange reason, I totally missed that. Yeah, that works nicely. Thanks.

> [@spingears](#):
>
> Why?

A colleague of mine was trying to inventory some SIM cards using Excel, and they have this 20 digit number printed at the back. She didn’t care about the numerical value of the number.

---

<div class="post-metadata">

**Author:** ![Dog80](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@Dog80](https://boards.straightdope.com/u/Dog80)\
**Post date:** [March 26, 2006, 11:47am UTC](https://boards.straightdope.com/t/entering-a-20-digit-number-in-excel/349798/14 "2006-03-26T11:47:05Z")

</div>

**OldGuy** , you must be really old! I remember the apostrophe from Lotus 1-2-3 for MS-DOS. I didn’t know this trick still works on Excel.
