+ Reply to Thread
Results 1 to 3 of 3

Simple Formula With two decimal Values showing values in far digits

  1. #1
    Registered User
    Join Date
    01-14-2021
    Location
    New York City
    MS-Off Ver
    Office 365 for Enterprise
    Posts
    1

    Simple Formula With two decimal Values showing values in far digits

    Hi I recently came across a rounding issue with an excel sheet that was causing problems.* We were attempting to move money from one bucket to another, so the total sum from various line items should be null or absolute zero, but we were getting very small value in far decimal places.* We cleared all values beyond the second decimal point and continued to get a value that was not absolute zero.* We then took some of the numbers with two decimal digits and hard input them into a separate excel sheet.* The same issue came up in that test where there are values far decimal positions in the formula total where there are none in the hard input numbers of the equation values.* See the attached screenshot and formula sample of the test.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Simple Formula With two decimal Values showing values in far digits

    Maybe you can use

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Kind regards
    Leo

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

    Re: Simple Formula With two decimal Values showing values in far digits

    This is a common problem, due to the fact that most decimal fractions cannot be represented in 64-bit binary floating-point exactly, which Excel uses internally. Also, the binary approximation of a particular decimal fraction might vary depending on the magnitude of the value. This often cause infinitesimal differences between the decimal and binary arithmetic results.

    For example, IF(10.01 - 10 = 0.01, TRUE) returns FALSE(!). In this case, we can see the difference: 10.01 - 10 displays 0.00999999999999979 when formatted appropriately. But often, we cannot see the difference because Excel formats only the first 15 significant digits.

    In general, when we expect a calculation to be accurate to some number of decimal places (2, in your case), explicitly round to that number of decimal places -- and not to an arbitrary number of decimal places like 10, as some people suggest.

    In your example, the formula in A3 should be:

    =ROUND(A2-A2, 2)

    PS.... Some people might suggest setting the option "Precision as displayed" (PAD). I do not recommend it. First, it applies only to formulas, not expressions. So, for example, it would not remedy my example with IF(10.01 - 10...) above. Second, merely setting the option might change constants irreversibly anywhere in the workbook, if the constant is formatted to display less precision. For that reason, if you want to experiment with PAD, make a copy of the Excel file first, so that you can revert to the copy if and when you discover that PAD is not the best solution for you.

    Apparently asked and answered in another forum (click here).
    Last edited by joeu2004; 01-14-2021 at 11:34 AM.

+ 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: 1
    Last Post: 04-20-2020, 10:08 PM
  2. Replies: 2
    Last Post: 05-17-2016, 11:17 AM
  3. Percentage Values displays as Decimal Values - Excel 2010
    By Adecypher in forum Excel General
    Replies: 3
    Last Post: 05-28-2015, 06:07 PM
  4. Replies: 6
    Last Post: 07-01-2014, 03:23 AM
  5. Pivot Chart displaying percentage values as decimal values
    By figo12 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-05-2013, 05:02 PM
  6. Changing digits after decimal to specific digits based on a criteria
    By mpatel000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-28-2012, 02:41 AM
  7. formula to eliminate the digits to the right of the decimal
    By mknispel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2011, 04:55 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