Forum Discussion
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:A2You 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)- Victor207Copper 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
- SergeiBaklanDiamond Contributor
If to display you may use
="DELTA H: " & TEXT( SQRT(((C764-C29)^2)+((D764-D29)^2)), "#.###")
- SergeiBaklanDiamond Contributor
IMHO, TRUNC does exactly the same as ROUNDDOWN if use with same number of digits
- Sergei,
You are absolutely right.
- Detlef_LewinSilver Contributor
Jim,,
could you show us your formula?