+ Reply to Thread
Results 1 to 8 of 8

Problem with Rounding

  1. #1
    Registered User
    Join Date
    10-22-2019
    Location
    Qatar
    MS-Off Ver
    2013
    Posts
    58

    Problem with Rounding

    Dear All,

    When i extract data from AutoCAD to excel, it's giving 2 digits of number. When i compare with my data it's not matching because of rounding problem.
    from autocad it's giving 0.005 and less than that = 0.00
    from excel it's giving less than 0.005 only = 0.00


    Ex=>

    In AutoCAD Rounding ( 0.005 ≥ x ) = 0.00
    ( 0.005 < x ) = 0.01

    In Excel Rounding ( 0.005 > x ) = 0.00
    ( 0.005 ≤ x ) = 0.01


    Please give me an idea to solve this issue. if i can round "0.005 =0.00" it's enough.

    I'm Using this formula to round 3 digits to 2 digits.
    Please Login or Register  to view this content.
    Thanks in Advance

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

    Re: Problem with Rounding

    Perhaps try the ROUNDDOWN function

  3. #3
    Registered User
    Join Date
    10-22-2019
    Location
    Qatar
    MS-Off Ver
    2013
    Posts
    58

    Re: Problem with Rounding

    Hi,
    I tried Rounddown function. it's rounding like this. ( 0.009 ≥ x ) = 0.00

    Please check the picture.
    Attached Images Attached Images

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

    Re: Problem with Rounding

    Yes I checked, and your question/remark is??

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

    Re: Problem with Rounding

    The only unusual entry I see in your pictured list is the 5th entry x.125 where Excel's ROUND() function rounds up to x.13 and AutoCad appears to be using Banker's rounding where it round to the nearest even (so x.125 rounds down to x.12).

    The other possibility is floating point errors. In Autocad, perhaps Autocad is seeing the value to its full precision and it sees x.12499999999, which naturally rounds down to .12. When exported to Excel with only 3 digits, this part of the information is lost and Excel sees x.125. Then, using Excel's "standard" round 5 up approach, it rounds this up to x.13.

    Those are two possible explanations for the behaviour you are seeing. As Pepe Le Mokko says, what is your question?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Problem with Rounding

    Quote Originally Posted by AhsanQatar View Post
    In AutoCAD Rounding
    ( 0.005 ≥ x ) = 0.00
    ( 0.005 < x ) = 0.01

    In Excel Rounding
    ( 0.005 > x ) = 0.00
    ( 0.005 ≤ x ) = 0.01
    Your question is clear to me, to wit: how can we coerce Excel to round the same way that AutoCAD does?

    The problem is: you have not provided enough examples (or a detailed explanation) for us to know how AutoCAD rounds "half" (half of 0.01, in this case).

    It might round half to even (a.k.a. banker's rounding). So, 123.135 rounds down to 123.14, just as 123.125 rounds to 123.12.

    It might round half down, as you describe. So, 123.135 rounds to 123.13, just as 123.125 rounds to 123.12.

    Also, please format the "database" column as Number with 13 decimal places, to display 15 significant digits.

    We need to know if the data from AutoCAD actually has more than 3 decimal places.

    If it does, it would be helpful to see examples like 123456.1254 and 123456.1256, as well as 123456.1354 and 123456.1356.

    Presumably, AutoCAD rounds all of them up to 123456.13 and 123456.14 respectively. But stranger things have happened.

    Finally, please follow the instructions in the bright yellow banner at the top of the webpage (hard to miss!), and attach an Excel file that demonstrates all of these examples instead of an image (PNG file).
    Last edited by joeu2004; 02-06-2020 at 12:46 PM.

  7. #7
    Registered User
    Join Date
    10-22-2019
    Location
    Qatar
    MS-Off Ver
    2013
    Posts
    58

    Re: Problem with Rounding

    Thank you Guys,

    The actual problem is this(same like @Mr.Shorty)

    My data is 123.334999999 = 123.335 (in EXCEL & it's giving me 123.34)
    = 123.334 (in Autocad & it's giving me 123.33)


    Now i got a solution. i have changed decimal place in AutoCAD now it's ok.

    Any Way Thank you.

  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,280

    Re: Problem with Rounding

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    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.

+ 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 Problem
    By nilelator in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-10-2017, 03:15 PM
  2. Problem with Rounding
    By amartino44 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-23-2013, 04:58 PM
  3. Rounding Problem in VBA
    By Johnnash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2012, 01:07 PM
  4. Rounding Up & Down Problem
    By mrpunch in forum Excel General
    Replies: 4
    Last Post: 08-09-2011, 09:35 AM
  5. Rounding-off Problem...
    By Manhar in forum Excel General
    Replies: 3
    Last Post: 11-07-2008, 04:45 PM
  6. Rounding problem
    By p_dhoke in forum Excel General
    Replies: 2
    Last Post: 08-14-2007, 04:26 AM
  7. rounding problem
    By bondcrash in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2005, 02: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