ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Why in excel does 41202.80721 get changed to 41202.8072099999 (https://www.excelbanter.com/excel-discussion-misc-queries/202313-why-excel-does-41202-80721-get-changed-41202-8072099999-a.html)

Jamo12t

Why in excel does 41202.80721 get changed to 41202.8072099999
 
Why do certain values in excel get converted such as the above or 41141.51430.

Thanks

James

Bob I

Why in excel does 41202.80721 get changed to 41202.8072099999
 
To simplify it's caused by the limits of binary storage and decimal
representation and the conversions between the two.

Jamo12t wrote:

Why do certain values in excel get converted such as the above or 41141.51430.

Thanks

James



Jerry W. Lewis

Why in excel does 41202.80721 get changed to 41202.8072099999
 
When you enter 41202.80721 into a cell in Excel versions prior to 2007, the
value in the formula bar shows as 41202.8072099999 as does its string
conversion or formats that show 15 figures. This is a bug in Excels display
routine that is fixed in Excel 2007. MS publicly acknowledged the bug for
only one of the millions of decimal fractions where it occurs.
http://support.microsoft.com/kb/161234
In all instances I am aware of, the underlying value retains the correct
binary representation, but the displayed value ends in 999€¦ instead of
correctly rounding up the displayed value.

I cannot reproduce a problem by entering 41141.51430 in a cell. Likely that
value in your case is the result of calculations, which did not equal what
you expected because of accumulated discrepancies between binary
approximations and your intended decimal numbers. The binary thing is common
to almost all numeric software; Excel's math is correctly implemented; and
Excel 2007 will give the same result as earlier versions.

Jerry

"Jamo12t" wrote:

Why do certain values in excel get converted such as the above or 41141.51430.

Thanks

James


Dana DeLouis

Why in excel does 41202.80721 get changed to 41202.8072099999
 
http://support.microsoft.com/kb/161234

I know this is old news, but for the op...
All values listed in the range that are offset by factors of 1/8 are also affected.
Hence, numbers ending in the following digits will also be converted in the formula bar.

{0.848, 0.973, 0.098, 0.223, 0.348, 0.473, 0.598, 0.723}

So, in Excel 2007...

Sub Demo()
[A1] = 50000.223
Debug.Print [A1].Text
Debug.Print [A1].Text + 1
End Sub

Returns:
50000.222999999900000
50001.2229999999

--
HTH :)
Dana DeLouis


"Jerry W. Lewis" wrote in message ...

When you enter 41202.80721 into a cell in Excel versions prior to 2007, the
value in the formula bar shows as 41202.8072099999 as does its string
conversion or formats that show 15 figures. This is a bug in Excels display
routine that is fixed in Excel 2007. MS publicly acknowledged the bug for
only one of the millions of decimal fractions where it occurs.
http://support.microsoft.com/kb/161234
In all instances I am aware of, the underlying value retains the correct
binary representation, but the displayed value ends in 999€¦ instead of
correctly rounding up the displayed value.

I cannot reproduce a problem by entering 41141.51430 in a cell. Likely that
value in your case is the result of calculations, which did not equal what
you expected because of accumulated discrepancies between binary
approximations and your intended decimal numbers. The binary thing is common
to almost all numeric software; Excel's math is correctly implemented; and
Excel 2007 will give the same result as earlier versions.

Jerry

"Jamo12t" wrote:


Why do certain values in excel get converted such as the above or 41141.51430.

Thanks

James


All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com