+ Reply to Thread
Results 1 to 3 of 3

How does this formula equal $0.00 but not " $ - " ?

  1. #1
    Registered User
    Join Date
    02-25-2011
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2003
    Posts
    11

    How does this formula equal $0.00 but not " $ - " ?

    OK, so to not bore you with too much detail, I have a workbook with simple calculations that track employee spending and payments....basically money in/out. Example below should equal zero and result in a " $ - " but instead it oddly shows "$0.00". This is happening in multiple cells while others "balance" and show correctly. I dug into it after realizing that certain mathematical calculations within could yield a fraction, but since it's just adding and subtracting with 2 decimals, there shouldn't be.

    A simple (yet extremely long) formula in one particular cell (formatted as Accounting) is this:

    =39+51.71+19.99+19.99+19.51-19.99-19.99+150.81-8.79+43.12+16.87+28.5+10.51+106.83+10.55+15.9-484.52+59.81+239.99+307+17+65.38+16.01+3.37+5.85+128.64+28.16+5.85+7.25+5.9+27.27+57.6+34.15+38+17.5+17.4+20.31+10.37+11.16+9+256.75+80.27+94.37+22.88+23.16-1082.13+75+123.15+63.58+38.02+46.21-5.43+23.19-3.64+75.08+31.95+19.99+19.99-600+23.92+9+36.96+8.97+3.66+151.6+153.77-23.93-203.99+25.96+110.97-468.28+159.25+17.06+10.68-42.41+14.98+45.96+35.33+75+23.05-468.28+156.44+4+4.25+6.06-49.63+18.5+18.5+59.85+47.43+19.99+19.99+39-439.97+50+62.49+61.68-213.17+19.99+19.99-20.58-19.4+387+8.68+3.25-398.93


    Which yields $0.00, but actually is this when expanded to 24 decimals:

    $0.000000000000568434188608

    How is this possible?

    This hasn't always been an issue, but all of a sudden it seems to be...but again, not for all cells.

    Here's an example of a much shorter one that works out fine:

    =1326.75+207.69+37.5+21.74+5.75+49.5+43.01+24+25.53+32.99+54.34+213.75-25.08-2017.47

    It yields the "$ - " instead of $0.00.

    Anyone wanna take a crack at this?

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How does this formula equal $0.00 but not " $ - " ?

    It's called floating point error.

    Long story short, use the ROUND function to round to the nearest hundredth.

    i.e. use something like this:

    =ROUND(formula,2)

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: How does this formula equal $0.00 but not " $ - " ?

    It is simply due to way computers handle numbers so the best you can do is ROUND to say 2 decimal places.

    See here:

    https://www.microsoft.com/en-us/micr...wrong-answers/

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Delete Rows if a cell does not equal "Finished" or "Complete"
    By Justair07 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-27-2013, 12:40 PM
  2. [SOLVED] Cell Formula to count time with "Greater Than or Equal to" and "Less Than"
    By chriswhite1982 in forum Excel General
    Replies: 3
    Last Post: 06-16-2013, 12:30 AM
  3. Replies: 1
    Last Post: 04-01-2013, 03:31 PM
  4. [SOLVED] IF formula with logical " Less than Or Equal To" NOT WORKING (Data is week number)
    By zeko90 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-28-2013, 02:51 PM
  5. Replies: 2
    Last Post: 01-10-2013, 06:13 PM
  6. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  7. Replies: 2
    Last Post: 05-19-2010, 08:13 PM
  8. [SOLVED] can I make cell "yes" equal 1, "no" equal 0
    By can I make cell "yes" equal 1, in forum Excel General
    Replies: 3
    Last Post: 01-25-2005, 05:06 PM

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