+ Reply to Thread
Results 1 to 8 of 8

Excel Rounding incorrectly starting at 8 decimal places - HELP!!

  1. #1
    Registered User
    Join Date
    06-02-2023
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    3

    Exclamation Excel Rounding incorrectly starting at 8 decimal places - HELP!!

    Good afternoon All,

    I'm currently experiencing a weird event in excel where only at 8 dp's excel is changing the values. See attached workbook.
    This is a journal posting with debits and credits.
    Note: I have tried using the ROUND to 2 dp, 4 dp function on the numbers in rows 9-219 but still get the same result.

    Every number in column's F + G from rows 9-219 is at 2 decimal places.
    SUM of debits to 2 dp's = 306,741.38
    SUM of credits to 2 dp's = 306,741.38

    However when we start to pull the formula out, after 8 dp's it doesnt balance anymore?? But all the numbers the formula is summing are only at 2 dp's, so we are royally confused why this is happening? The problem it is creating is, when this is loaded in to our ERP system, the system thinks the journal doesnt balance, but we cannot identify which line it is (per the attachment) as all lines from 9-219 are only at 2 dp's.....

    SUM of debits to 7 dp's = 306,741.3800000
    SUM of credits to 7 dp's = 306,741.3800000

    SUM of debits to 8 dp's = 306,741.37999999
    SUM of credits to 8 dp's = 306,741.38000000

    Any help would be appreciated?

    Kind regards
    Jmorrison677
    Attached Files Attached Files
    Last edited by Jmorrison677; 06-02-2023 at 08:09 AM.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Excel Rounding incorrectly starting at 8 decimal places - HELP!!

    Welcome to the forum.

    Floating point errors (Google it - it catches many people out).

    =ROUND(SUM(F9:F219),2)
    =ROUND(SUM(G9:G219),2)
    Last edited by AliGW; 06-02-2023 at 08:14 AM.
    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 Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,859

    Re: Excel Rounding incorrectly starting at 8 decimal places - HELP!!

    Search your favorite knowledge base for floating point error. This has been a part of computer arithmetic since the introduction of floating point data types decades ago.

    In Excel, solutions usually revolve around the use of rounding functions to force decimal values to be consistently represented.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    06-02-2023
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    3

    Re: Excel Rounding incorrectly starting at 8 decimal places - HELP!!

    Hi AliGW,

    So even though all the numbers in rows 9 - 219 are at 2 decimal places only...excel is somehow changing the numbers?
    I would understand it, if each of the numbers had 8 dp's or more, but they dont. Like if you pull the numbers on rows 9-219 to 100 dp's none of the numbers ever go above 2 dp's i.e. 19.920000000000000, the 3rd to infinity digits are zero.....

  5. #5
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Excel Rounding incorrectly starting at 8 decimal places - HELP!!

    So even though all the numbers in rows 9 - 219 are at 2 decimal places only...excel is somehow changing the numbers?
    If you Google 'Excel floating point errors' you will be able to read all about how/why it happens. All you need to know is how to overcome it. It isn't someting that you are going to be able to prevent, so you (we all) have to roll with it.

    Use ROUND in your SUM calculations.

    I would understand it, if each of the numbers had 8 dp's or more, but they dont.
    They don't need to have. As I said, read up on it, please.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Excel Rounding incorrectly starting at 8 decimal places - HELP!!


  7. #7
    Registered User
    Join Date
    06-02-2023
    Location
    Scotland
    MS-Off Ver
    365
    Posts
    3

    Re: Excel Rounding incorrectly starting at 8 decimal places - HELP!!

    OK thanks
    The ROUND of the SUM does work to get the rounding error resolved, but the file itself is loaded in to our ERP system and the ERP is kicking out the entry saying it doesnt balance - all rows 9-219 as i said above are only at 2 dp's, so would the floating point error occur out-with Excel? or is it because the raw data has originated in excel where the floating point error functionality has occurred that this will always happen?

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Excel Rounding incorrectly starting at 8 decimal places - HELP!!

    I don't know the answer to that question (was it the chicken or the egg?) and I am afraid I know nothing about your ERP system, so I don't think that I can advise any more. If you can live with it in Excel and your ERP accepts the results, then don't use ROUND.

    The article I linked to explains it - it's to do with binary code at the end of the day, so in theory any computer program can be susceptible to it, not just Excel.

+ 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] rounding down to nearest 3 decimal places after the decimal point
    By swfarm in forum Excel General
    Replies: 2
    Last Post: 10-18-2018, 11:42 AM
  2. [SOLVED] Formatting, Rounding Decimal places
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-24-2015, 03:55 PM
  3. [SOLVED] Get 5 Decimal places without rounding off
    By puuts in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-10-2013, 09:38 AM
  4. [SOLVED] Rounding Decimal Places in Increments
    By adam2308 in forum Excel General
    Replies: 2
    Last Post: 02-11-2013, 07:56 PM
  5. 2 Decimal Places without rounding ?
    By _Lewis in forum Excel General
    Replies: 8
    Last Post: 04-08-2011, 06:14 AM
  6. decimal places and rounding up
    By byepeeps in forum Excel General
    Replies: 7
    Last Post: 02-09-2007, 10:48 AM
  7. Decimal places and rounding up (or down)
    By Ash in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-15-2005, 06:45 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