+ Reply to Thread
Results 1 to 5 of 5

Two decimal places.

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    Wirral
    MS-Off Ver
    Excel 2016
    Posts
    31

    Two decimal places.

    Does anybody know if there is a way to format a spreadsheet so that regardless of what is entered onto it, it will be rounded to two decimal places?

    The gist of this is that a reporting tool I use returns results - excel based, but then need to be paste specialed as values. The result of doing that is that the values come out at the likes of 789.8278257253 even though the value in the actual cell would say 789.83.

    So, the value in the cell rounds to two decimal places on the face of it, but underlying it is the rest of the decimal places and it's that part that I need rid of.

    Any ideas or solutions would be much appreciated.

  2. #2
    Forum Contributor
    Join Date
    07-27-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: Two decimal places.

    I think you would have more confidence in your data
    by doing the calculation in a separate column rather
    than using a solution that magically and invisibly
    removes all but two trailing decimal places as soon as
    the data is copied to a cell.

    Try this formula with your numeric value in cell A1, and
    the formula in B1:
    Please Login or Register  to view this content.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Two decimal places.

    You can use the Precision as Displayed option (although use it with care, as you can't undo it). Click on the Office button, then Excel Options (bottom of panel), then Advanced, then scroll down to the section "When calculating this workbook", then check against Precision as Displayed.

    You might like to have a look at some of the other settings that control how Excel works for you, then click OK when finished.

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Mexico
    Posts
    200

    Re: Two decimal places.

    Maybe this short macro:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-26-2012
    Location
    Wirral
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Two decimal places.

    Thanks very much for sharing your skills folks! I think precision as displayed is going to be perfect for this one, so thanks very much for that Pete.

    I've already thought of another use for that macro you given me, Armando, so thanks very much for that too. I've been using the round function in the manual way, but that macro is going to work brilliant instead!

    Can't test them out until Monday, but I think it's going to be sorted.

    Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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