+ Reply to Thread
Results 1 to 22 of 22

Number Not Subtracting Correctly (Glitch?)

  1. #1
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Number Not Subtracting Correctly (Glitch?)

    Hi --

    For some reason, when I write =1531316.44-1500000, it returns 31316.4399999999, and not the correct answer: 31316.44.
    This is making me go crazy. Is there an issue with my excel? Does it work for you? Is there a way to fix?
    Thank you

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Number Not Subtracting Correctly (Glitch?)

    First, try expanding the decimal places to see if .44 resolves to .439. If not, then Google "Excel Floating Point Error" and you will be able to read about this, if it's what's causing your issue.

    Only way for us to be really sure is to see the workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Number Not Subtracting Correctly (Glitch?)

    =round(1531316.44-1500000,2)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Number Not Subtracting Correctly (Glitch?)

    A simple formula =1531316.44-1500000 will not cause floating point error. Did you derive the 2 figures from other cells?

  5. #5
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Number Not Subtracting Correctly (Glitch?)

    I typed the numbers in as presented above. Simple workbook, no reference cells.
    Effectively, if you copy/paste '=1531316.44-1500000' do you see the same issue, or is it returning the correct result for others?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Number Not Subtracting Correctly (Glitch?)

    Then show us!

    There are instructions at the top of the page explaining how to attach your sample workbook.

    Excel 365 (Windows) 32 bit
    A
    B
    1
    31316.44
    =1531316.44-1500000
    Sheet: Sheet1

    Copying and pasting from your post will not tell us anything other we can copy and paste from your post ...
    Last edited by AliGW; 08-01-2021 at 10:01 AM.

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Number Not Subtracting Correctly (Glitch?)

    No issue with my Excel 2016 version. So, it is MS365 glitch, like what you mentioned.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Number Not Subtracting Correctly (Glitch?)

    No, there is no glitch in MS365. I tested it (see post #6).

  9. #9
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Number Not Subtracting Correctly (Glitch?)

    Please find sample workbook attached
    Thank you
    Attached Files Attached Files

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Number Not Subtracting Correctly (Glitch?)


  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Number Not Subtracting Correctly (Glitch?)

    I can replicate it in YOUR file, but I cannot replicate it in a new file of my own (attached).
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Number Not Subtracting Correctly (Glitch?)

    Hi Ali

    When I extend what you sent to 11 decimal places or more, I'm still seeing the issue.
    Did you try extending to multiple decimals places as well? When I opened the file you sent it was only extended to 6 decimal places.
    Thank you

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Number Not Subtracting Correctly (Glitch?)

    Ah, yes - it does happen then.

    This is a manifestation of the floating points issue, as noted earlier. It's existed for a long, long time.

    Use the ROUND workaround to get round it (pardon the pun).

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Number Not Subtracting Correctly (Glitch?)

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  15. #15
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Number Not Subtracting Correctly (Glitch?)

    Thank you Ali --

    I'd say it was addressed, but not necessarily 'SOLVED'.

    What's the best way forward for a situation like this?

    Thank you

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Number Not Subtracting Correctly (Glitch?)

    You need to mark this as SOLVED. We have exhausted the help we can offer and identified the issue (floating point error). It is beyond the scope of THIS forum to fix issues for Microsoft, therefore we've done our bit.

    I'm sorry it's not to your satisfaction, but your only recourse now is to take it up with MS.

  17. #17
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Number Not Subtracting Correctly (Glitch?)

    I understand

    However, out of respect for the integrity of the forum, and posterity, I don't believe this issue could accurately be considered SOLVED.
    It is also unclear to me how my problem related to the floating point issue. After reading the provided material, none of the examples given explain why '=1531316.44-1500000' returns this issue but a similarly simple equation '=1531316.44-1400000' does not.

    If the forum wishes to explain this, I would feel comfortable with marking as SOLVED.

    Thank you for all your help

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Number Not Subtracting Correctly (Glitch?)

    I am happy to explain this again (in different words).

    We cannot solve the issue. The problem of the floating point error is one that has been around for a long time.

    Your title was: "Number Not Subtracting Correctly (Glitch?)"

    Having looked carefully at your situation, the forum community has identified the glitch as part of the floating point error issue.

    You also asked: "Is there a way to fix it?"

    Now that we have identified what the issue is, the answer is NO, but you can work around it as mentioned earlier with the ROUND function.

    Therefore, by my reckoning, we have answered your questions, therefore the issue is resolved: to show this, we ask you to add the solved tag.

    As I said, it is beyond the scope of THIS forum to fix the floating point issue. You will have to ask Microsoft if you want to get an explanation about why it's affecting this particular calculation.
    Last edited by AliGW; 08-02-2021 at 08:27 AM.

  19. #19
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Number Not Subtracting Correctly (Glitch?)

    Thank you for that rundown.

    Could you please clarify how this specific situation is a floating point issue?

    I believe all I've seen so far is a link to a page that doesn't address the scenario I've experienced.

    I may have missed it. What explanation would you, or the forum community give?

    Thanks in advance for your elucidation.

  20. #20
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Number Not Subtracting Correctly (Glitch?)

    ARTICLE

    Why does 1.3240 – 1.3190 = 0.0049999999999999?

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

  21. #21
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Number Not Subtracting Correctly (Glitch?)

    Have you taken a moment to read the link provided in post #10 ?

  22. #22
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Number Not Subtracting Correctly (Glitch?)

    Floating point error is an inherent part of the way computers do arithmetic. As long as computers have finite memory, we will experience floating point error. And it will always seem random and unpredictable.

    I don't know if these will help, but here's a collection of links https://www.excelforum.com/groups/ma...nd-errors.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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. subtracting dates from a solid number
    By mooka1209 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-14-2017, 05:02 PM
  2. [SOLVED] How to correctly display the correct calculated number and mask away exceeding number
    By Andrew88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2017, 07:44 AM
  3. [SOLVED] putting a ' before number and its still subtracting
    By Chris_newton in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-06-2015, 07:35 AM
  4. [SOLVED] Basic Formula Not Subtracting/looking at Imported time Correctly
    By jayclinton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-02-2014, 09:10 PM
  5. [SOLVED] Need HELP subtracting a number only if it is greater than another number
    By FLOWERGIRL in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-13-2012, 06:58 PM
  6. Subtracting a range from number..
    By zudecke in forum Excel General
    Replies: 3
    Last Post: 07-30-2010, 09:15 AM
  7. Adding and subtracting from a number
    By LeroyS in forum Excel General
    Replies: 4
    Last Post: 06-24-2008, 12:26 PM

Tags for this Thread

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