Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
CiaraF
 
Posts: n/a
Default How do you display 16 digit numbers in excel ? (it keeps convert.

I'm trying to display 16 digit numbers in excel but it keeps converting the
last digit to a zero. Is there a way to format the cells so the 16 digits are
displayed and can be used in a vlookup formula ?
  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 30 Mar 2005 01:55:02 -0800, CiaraF
wrote:

I'm trying to display 16 digit numbers in excel but it keeps converting the
last digit to a zero. Is there a way to format the cells so the 16 digits are
displayed and can be used in a vlookup formula ?


Excel (and most spreadsheet) specifications are in accord with an IEEE standard
which has a 15 digit precision.

The only way to do what you want is to enter the value as TEXT. Either precede
your entry with an apostrophe (which will not be displayed; OR format the cell
as TEXT prior to making your entry.

VLOOKUP will work with TEXT entries.
--ron
  #3   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

Ron Rosenfeld wrote:

....
Excel (and most spreadsheet) specifications are in accord with an IEEE standard
which has a 15 digit precision.

....


FYI Many IEEE double precision packages will display more than 15 digits
(for instance, R and S-PLUS display 17). Most 16 digit numbers,
including integers up to
2^53-1 = 9007199254740991
are exactly representable. Presumably MS chose to limit display to 15
digits to avoid questions when unrepresentable 16 digit numbers, such as
2^53+1 = 9007199254740993
get changed to different 16 digit numbers (9007199254740992) that are
representable.

This also relates to a difference between Excel and VBA. If you past a
16+ digit number into Excel, the number will be truncated (not rounded)
to 15 digits before conversion to binary. If you paste a 16+ digit
number into into VBA, that number will be converted to binary directly
(the trailing digits will impact the binary representation), although
subsequent editing of that line would then obliterate the original extra
precision. The easiest way to see this phenomenon is to compare the
result of the Excel formula
=("2059510000000001"-"2059510000000000")
with the result of the VBA formula
dif = CDbl("2059510000000001") - CDbl("2059510000000000")

You can use VBA to poke better representations of 16+ digit numbers into
Excel cells.

It would be nice if future versions of Excel would do the binary
conversion without truncation (like VBA), but I'm not holding my breath ...

Jerry

  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 30 Mar 2005 08:02:02 -0500, "Jerry W. Lewis"
wrote:

Ron Rosenfeld wrote:

...
Excel (and most spreadsheet) specifications are in accord with an IEEE standard
which has a 15 digit precision.

...


FYI Many IEEE double precision packages will display more than 15 digits
(for instance, R and S-PLUS display 17). Most 16 digit numbers,
including integers up to
2^53-1 = 9007199254740991
are exactly representable. Presumably MS chose to limit display to 15
digits to avoid questions when unrepresentable 16 digit numbers, such as
2^53+1 = 9007199254740993
get changed to different 16 digit numbers (9007199254740992) that are
representable.

This also relates to a difference between Excel and VBA. If you past a
16+ digit number into Excel, the number will be truncated (not rounded)
to 15 digits before conversion to binary. If you paste a 16+ digit
number into into VBA, that number will be converted to binary directly
(the trailing digits will impact the binary representation), although
subsequent editing of that line would then obliterate the original extra
precision. The easiest way to see this phenomenon is to compare the
result of the Excel formula
=("2059510000000001"-"2059510000000000")
with the result of the VBA formula
dif = CDbl("2059510000000001") - CDbl("2059510000000000")

You can use VBA to poke better representations of 16+ digit numbers into
Excel cells.

It would be nice if future versions of Excel would do the binary
conversion without truncation (like VBA), but I'm not holding my breath ...

Jerry


Thank you for that explanation.


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dont display the colors on the Cell ( Excel 2003 ) pigolampida New Users to Excel 1 February 1st 05 11:22 AM
Exporting numbers into Excel shedevel143 Excel Discussion (Misc queries) 1 December 11th 04 12:37 PM
Excel: To Display Formula in the cells Instead of Value [email protected] Excel Discussion (Misc queries) 1 December 10th 04 09:48 PM
Excel should be able to compute the MOD of large numbers. Gold Fish Excel Worksheet Functions 5 December 3rd 04 09:10 AM
column headings display as numbers JayT Setting up and Configuration of Excel 2 November 29th 04 06:51 PM


All times are GMT +1. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"