+ Reply to Thread
Results 1 to 11 of 11

Display without rounding

  1. #1
    Registered User
    Join Date
    06-23-2015
    Location
    wisconsin USA
    MS-Off Ver
    13
    Posts
    59

    Display without rounding

    I need to display a certain number of decimal places but the displayed value cannot be rounded.
    It's similar to the Trunc() function but the value of the cell using the Trunc() function does not account for all of the decimal places available in the original number.

    in the example below, if I truncate the values to 4 decimal places then multiply it by 3, I get different results than using the original value.

    original value truncated to 4 decimal places and displayed with 9 places.
    0.05498381180 0.054900000


    both multiplied by 3
    0.164951435 0.1647



    changing the displayed format of the cell results in a rounded value (e.g. 0.0550)
    The displayed value needs to be 0.0549 but subsequent calculations need to use all of the available decimals.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Display without rounding

    This should work:
    Please Login or Register  to view this content.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Display without rounding

    You can't display the unrounded value; formatting 0.05498381180 as 0.0000 will indeed display 0.0550, but downstream calculations will use the unrounded value.
    Last edited by shg; 06-24-2015 at 06:10 PM.
    Entia non sunt multiplicanda sine necessitate

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

    Re: Display without rounding

    Quote Originally Posted by dr01allen View Post
    I need to display a certain number of decimal places but the displayed value cannot be rounded. It's similar to the Trunc() function but the value of the cell using the Trunc() function does not account for all of the decimal places available in the original number.
    [....]
    changing the displayed format of the cell results in a rounded value (e.g. 0.0550)
    The displayed value needs to be 0.0549 but subsequent calculations need to use all of the available decimals.
    First, be sure the option "Precision as displayed" (PAD) is not enabled. If it is enabled, formatting to Number with 4 decimal places, for example, does round the underlying value as well.

    If the underlying value is a constant, it is permanently rounded, even after you disable PAD. If the underlying value is derived from a formula, disabling PAD will restore the full precision of the value.

    Second, Excel does not have a formatting option to display 4 decimal places and truncate instead of rounding the 5th decimal place.

    So if you must truncate the appearance of a value while retaining the full precision of the value, you will need to use two cells: one for display; the other for the actual value. The latter can be hidden.

    On the other hand, if you misspoke and rounding the appearance is acceptable as long as the value retains the full precision, simply format as Number with 4 decimal places, for example, with PAD disabled.
    Last edited by joeu2004; 06-24-2015 at 06:22 PM. Reason: cosmetic

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Display without rounding

    Dont confuse the actual contents of a cell, with HOW the contents of a cell is displayed.

    A cell can contain up to 15 digits, all of them decimal, but you can format that to show only 3 (or 4 or whatever) decimal places. That is what the cell will show, but that is not what teh cell contains
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    06-23-2015
    Location
    wisconsin USA
    MS-Off Ver
    13
    Posts
    59

    Re: Display without rounding

    Quote Originally Posted by mikeTRON View Post
    This should work:
    Please Login or Register  to view this content.
    Nope, that gives the same result as Trunc()

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Display without rounding

    shg and joeu speak truth.
    Can't get there from here unless you use additional columns and hide them.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Registered User
    Join Date
    06-23-2015
    Location
    wisconsin USA
    MS-Off Ver
    13
    Posts
    59

    Re: Display without rounding

    Quote Originally Posted by joeu2004 View Post
    First, be sure the option "Precision as displayed" (PAD) is not enabled. If it is enabled, formatting to Number with 4 decimal places, for example, does round the underlying value as well.

    If the underlying value is a constant, it is permanently rounded, even after you disable PAD. If the underlying value is derived from a formula, disabling PAD will restore the full precision of the value.

    Second, Excel does not have a formatting option to display 4 decimal places and truncate instead of rounding the 5th decimal place.

    So if you must truncate the appearance of a value while retaining the full precision of the value, you will need to use two cells: one for display; the other for the actual value. The latter can be hidden.

    On the other hand, if you misspoke and rounding the appearance is acceptable as long as the value retains the full precision, simply format as Number with 4 decimal places, for example, with PAD disabled.


    To expand on the issue:
    I work in a Federally Regulated environment. By law, we cannot use rounded numbers in calculations. We are also required to show the values used in calculations to 2 digits more than the criteria used to evaluate the results. The spreadsheets are printed and used when auditors ask for the data.

    The displayed values are used by reviewers to verify results. Using the example data above, the results from un-altered data are significantly different than results from the displayed values. Many auditors recognize the difference and accept review of the formulas as sufficient. One particular auditor is requiring the presented data to be sufficient to replicate the results as displayed.

    The presented data is an example of where displayed data is not sufficient.

    Adding an additional column or cell for intermediate data is not desirable since any additional cells require additional review by a second person. Hiding the cells is not acceptable.
    Last edited by dr01allen; 06-25-2015 at 11:18 AM.

  9. #9
    Registered User
    Join Date
    06-23-2015
    Location
    wisconsin USA
    MS-Off Ver
    13
    Posts
    59

    Re: Display without rounding

    Quote Originally Posted by ChemistB View Post
    shg and joeu speak truth.
    Can't get there from here unless you use additional columns and hide them.
    If it can' be done, it can't be done.

    Due diligence requires that I ask 'those who know more than I" before going to management and say you can't have what you want.

  10. #10
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Display without rounding

    I still struggle to see the point of this question, if you dont want rounding on the fourth decimal place, then DISPLAY five decimals. I would go tell management excel is designed to round at the level of decimals shown BUT the underlying data does NOT change. This means any calculations off that cell will still be correct.

  11. #11
    Registered User
    Join Date
    06-23-2015
    Location
    wisconsin USA
    MS-Off Ver
    13
    Posts
    59

    Re: Display without rounding

    We have a requirement to display numbers to 2 decimal places greater than the precision of the criteria.

    For example, if a measured property (concentration, length of extension, voltage, etc.) is 0.05498381180 and the criteria is <= 0.05, then we need to display it to 4 decimal places.
    The actual value meets spec since it's less than 0.05. The required display (to 4 decimal places) shows 0.0550 which is out of spec.

    If I use the Trunc() function, it displays 0.0549 which is shows it to be in spec. However, if I use the truncated value in subsequent calculations the result is different than the result obtained using the full set of digits.

    I was requested to find a way to display the value in a cell using 4 decimals without rounding while still having the full compliment of digits in the underlying value. The only solution I could come up with was to use 2 cells. However, both cells must be displayed and the one rounded to 4 places is different from the one truncated.

+ 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. Display rounding adjustment before getting the end result
    By fandy123 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-03-2016, 03:23 PM
  2. [SOLVED] Rounding problems using lookup instead of rounding functions
    By thnkfree in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-18-2014, 06:21 PM
  3. Display rounded number but don't use rounding in calculation
    By darxide23 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-05-2013, 03:47 PM
  4. Please explain this phenomena of rounding / display issues
    By clemsoncooz in forum Excel General
    Replies: 2
    Last Post: 02-21-2012, 03:16 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