+ Reply to Thread
Results 1 to 4 of 4

Unable to obtain a true addition with- odd excel fuction.

  1. #1
    Registered User
    Join Date
    03-21-2010
    Location
    New Zealand
    MS-Off Ver
    Excel 365
    Posts
    46

    Unable to obtain a true addition with- odd excel fuction.

    Hi, I hope you can give me some help...I have a spreadsheet that contains a simple column of plus numbers and minus numbers.. In the event of me placing a number into cell a18, the sum of the column indicates an additional (point) .0000000001 into the equation. I have replicated the column on another computer with the same result. To negate a virus, I have done a Microsoft office 365 repair and also tried a fresh install with no satisfaction.

    So when I do a balance in the spreadsheet of course I get an error. Interested in a solution. Thank you for any assistance. Cheers Sedge.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Unable to obtain a true addition with- odd excel fuction.

    imo, it might be the problem of binary conversion to decimal
    especially for a decimal point number

    Regards.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: Unable to obtain a true addition with- odd excel fuction.

    Typical issue with 64-bit binary floating-point arithmetic (*).

    Change the formula in A2 to =ROUND(SUM(A4:A19), 2), if you expect it to be accurate to 2 decimal place.

    FYI, not every number in A18 results in "a spurious decimal" in A2. For example, enter 456 in A18, and Excel displays 355.290000000000 in A2.

    OTOH, sometimes we cannot see the "spurious decimal", because Excel formats only up to 15 significant digits, rounded.

    For example, even when there is nothing in A18 and A2 displays -100.710000000000, there is an infinitesimal difference of about -7.11E-14. We can see that with a formula of the form =SUM(A2,-(A2&"")).

    (We cannot write simply =A2-(A2&""), because Excel sometimes substitutes exactly zero for the actual arithmetic difference in that specific context. OTOH, =A2-(A2&"")=0 returns FALSE.)


    -----
    (*) Explanation....

    The problem is: Excel uses a binary form to store numbers and perform arithmetic. And most decimal fractions cannot be represented in that binary form (64-bit binary floating-point). Moreover, the binary approximation of the same decimal fraction might vary, depending on the magnitude of the number. That is why, for example, 10.01 - 10 = 0.01 returns FALSE(!).

    In general, the work-around is: when we expect a calculation to be accurate to some number of decimal places, explicitly round to that number of decimal places -- and not to an arbitrary number like 10, as some people suggest.

    The operative words are "expect" and "calculation".

    There are times when we do not want to round the calculation or constant, but we want to present (format) it with potentially less precision. Only you can make that decision. That is one of many reasons why I discourage setting the "Precision as displayed" option as an alternative to explicit rounding.
    Last edited by curiouscat408; 01-06-2022 at 11:41 PM. Reason: explanation

  4. #4
    Registered User
    Join Date
    03-21-2010
    Location
    New Zealand
    MS-Off Ver
    Excel 365
    Posts
    46

    Re: Unable to obtain a true addition with- odd excel fuction.

    Thanks Curiouscat408. Great explanation & solution. Very grateful. Cheers

+ 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. Replies: 5
    Last Post: 07-27-2021, 12:17 AM
  2. Unable to use MATCH/INDEX to obtain value above and below in a column
    By ryanmc29 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-01-2014, 08:31 AM
  3. Replies: 3
    Last Post: 11-08-2012, 07:25 PM
  4. Unable to copy cells or obtain password to unprotect
    By pandra in forum Excel General
    Replies: 2
    Last Post: 09-21-2012, 04:58 AM
  5. [SOLVED] Unable to obtain Average due to cells contain #N/A value
    By PosseJohn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-06-2012, 07:31 AM
  6. [SOLVED] How do I stop Excel from changing the word true to TRUE?
    By Schmyerlou in forum Excel General
    Replies: 1
    Last Post: 11-23-2005, 05:00 PM
  7. External Data Refresh if fuction is true.
    By The Boondock Saint in forum Excel General
    Replies: 1
    Last Post: 06-16-2005, 04:05 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