Forum Discussion

Jim Higbee's avatar
Jim Higbee
Copper Contributor
Oct 15, 2017

Limiting number of decimal places in a returned formula

I have an Ex 2010 formula that returns 4 decimal places (.7501). I need to use only the first 2 decimal places (.75) for another calculation.

I have tried roundup, and although the cell only displays 2 decimal places (.75), Excel stills retains the remaining decimal places to the right (.__01, which corrupts my next calculation.

Is there a way to limit the accuracy of a returned number for a single cell or a range of cells without changing the accuracy of the entire worksheet.

 

 

9 Replies

  • Hi Jim,
    You can use the TRUNC( )function with the required format in the required cell or cells.
    Example:
    if you are using  =SUM(A1:A2) to get the sum of the Cell A1:A2

    You can add the TRUNC( ) function with the following format to limit it to 2 numbers after the decimal without roundup the number.
    =TRUNC(SUM(A1:A2),2)

    • Victor207's avatar
      Victor207
      Copper Contributor

      Jihad Al-Jarady I have a similar problem where I have a square root formula that has text and the answer in the cell.  I would like to limit the decimal places in the final answer to 3 places.

       

      This is my formula:

      ="DELTA H: "&SQRT(((C764-C29)^2)+((D764-D29)^2))

       

      For example, the answer comes out as:

      DELTA H: 0.0564003545403856

       

      And I would much rather have the answer display as:

      DELTA H: 0.056

       

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Victor207 

        If to display you may use

        ="DELTA H: " & TEXT( SQRT(((C764-C29)^2)+((D764-D29)^2)), "#.###")
    • SergeiBaklan's avatar
      SergeiBaklan
      Diamond Contributor

      IMHO, TRUNC does exactly the same as ROUNDDOWN if use with same number of digits

Resources