+ Reply to Thread
Results 1 to 2 of 2

Excel adds phantom decimal places: why?

  1. #1
    Dave O
    Guest

    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. #2
    JE McGimpsey
    Guest

    Re: Excel adds phantom decimal places: why?

    See

    http://cpearson.com/excel/rounding.htm

    In article <[email protected]>,
    "Dave O" <[email protected]> wrote:

    > The workaround is to round to an appropriate number of decimal places,
    > but why does this happen?


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1