Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Excel adds phantom decimal places: why?
By coincidence, two posts today have asked about Excel adding phantom
decimal places to entries: http://groups.google.com/group/micro...36d0799e3421d4 http://groups.google.com/group/micro...2abd3771aaa94f I have experienced this as well: when I enter a dollar amount with just 2 decimal places and convert those values to variables in VBA code, Excel adds trailing decimal places. These do not affect the dollar value, but they do create problems when performing a comparison, such as If TotalBux = 0 Then (etc) In this example, the value of TotalBux can be so close to zero that it makes no effective difference: except that mathematically it does not equal zero due to the decimal places, creating an internal logic flaw. The workaround is to round to an appropriate number of decimal places, but why does this happen? |
#2
|
|||
|
|||
See
http://cpearson.com/excel/rounding.htm In article .com, "Dave O" wrote: The workaround is to round to an appropriate number of decimal places, but why does this happen? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel decimal format | Excel Discussion (Misc queries) | |||
Excel Range Value issue (Excel 97 Vs Excel 2003) | Excel Discussion (Misc queries) | |||
decimal places within a formula | Excel Discussion (Misc queries) | |||
DECIMAL PLACES IN FORMULAS | Excel Worksheet Functions | |||
Numbers after decimal point excel to word mail merge | Excel Worksheet Functions |