+ Reply to Thread
Results 1 to 7 of 7

Too Many Decimal Places In Formula

  1. #1
    Registered User
    Join Date
    12-06-2007
    Posts
    32

    Too Many Decimal Places In Formula

    I am horrible at writing formulas, but I needed a simple formula that would calculate gross tons per day using annual tons produced (O82)and actual operating days (O86).

    This formula works, but generates 12 decimal places, which I do not want.

    ="Gross: "&O82/O86

    returns:

    Gross: 423.499555555556

    How can I get the fomula to return 1-2 decimal places?

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Hi, Rick. Try:

    ="Gross: "&ROUND(O82/O86,2)

    or

    ="Gross: "&TEXT(O82/O86,"0.00")

    HTH

    Jason

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523
    Try
    ="Gross: "&ROUND(O82/O86,2)

  4. #4
    Registered User
    Join Date
    12-06-2007
    Posts
    32
    That was the fastest response I have ever received. Thank you.

    The first formula looks to be what I need, but it gives 2 decimal places in one cell, and 1 another.

    (I have the exact same formula for Net Tons and Gross Tons.)

    The formatting appears identical.

  5. #5
    Registered User
    Join Date
    12-06-2007
    Posts
    32
    Even more odd...

    ="Gross: "&ROUND(O82/O86,2) returns 1 decimal place;
    ="Gross: "&ROUND(O82/O86,3) returns 1 decimal place;
    ="Gross: "&ROUND(O82/O86,4) returns 4 decimal places;
    ="Gross: "&ROUND(O82/O86,5) returns 5 decimal places;
    ="Gross: "&ROUND(O82/O86,6) returns 6 decimal places;
    ="Gross: "&ROUND(O82/O86,7) returns 7 decimal places; etc...

  6. #6
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Rick,

    The 2nd option I posted above will not round, but it will always show 2 decimal places.

    If you want to round it to 2 decimal places, then you can incorporate both functions I used above:

    ="Gross: "&TEXT(ROUND(O82/O86,2),"0.00")

    HTH

    Jason

  7. #7
    Registered User
    Join Date
    12-06-2007
    Posts
    32
    Thanks! That works great.

+ 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