• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

round off

Hi, kalpeshpatel!


Depending on the type of rounding desired you should use ROUND function (rounds to a specified number of digits, from 0-4 towards 0 and from 5-9 towards next unit) or ROUNDUP function (same but always up to next unit). There's a ROUNDOWN too, but I guess this isn't the case.


If you have a number as 945.47 and you want to round to 946.00 use ROUNDUP, and if to 945.00 use ROUND.


Regards!
 
@kalpeshpatel,


Select the cell and use 'Decrease Decimal' to decrease the decimal values. It will be rounded off as you want to select the cell and custom format number as
Code:
#
and it will show you 946.


Please note that if you have a the decimal part greater then 0.5 then it will round up, else wise it will round down.


Regards,

Faseeh
 
Hi, kalpeshpatel!


Sorry for interrupting again, but let me say that you should be aware of the slight difference between using any ROUNDxxx function and formatting the cell for displaying.


If you use any ROUNDxxx function, you're maintaining the original value in source cell (let's say A9) and modifying the value in target cell (let's say A10) by typing in A10 "=ROUND(A9,0)" unquoted. So you'll have 945.67 in A9 and 946.00 in A10, if both cells formatted with 2 decimal places.


If you format a cell (let's say source cell A9) and set it to zero decimal places, you'll still have 945.67 but it'd display 946. It doesn't change the stored value.


Hope it helps to clarify.


Regards!
 
Back
Top