#ROUND
Rounds a number to the specified number of decimal places, or, if unspecified, to the nearest integer.
Syntax:
Number1 #ROUND number2
Examples:
2 #ROUND 123.456 equals 123.46
#ROUND 123.456 equals 123
-1 #ROUND 123.456 equals 120
#ROUND –123.456 equals –123
#ROUND 123.666 equals 124
Rounding Up:
To round up non-integer values, use the #CEILING function and multiply and divide by the decimal place that you want:
.01 * #CEILING (number / .01) will round up to the hundredth
.001 * #CELING (number / .001) will round up to the thousandth
Thus:
.01 * #CEILING (123.456 / .01) equals 123.46
To start with an annual amount and round up monthly payments to cents, divide by .12 instead of .01. Thus:
.12 * #CEILING (1481.47 / .12) equals 1481.52
Rounding Down:
In a parallel fashion to rounding up, to round down non-integer values, use the #FLOOR function and multiply and divide by the decimal place that you want:
.01 * #FLOOR (number / .01) will round down to the hundredth
.001 * #FLOOR (number / .001) will round down to the thousandth
Thus:
.01 * #FLOOR (123.456 / .01) equals 123.45
To start with an annual amount and round down monthly payments to cents, divide by .12 instead of .01. Thus:
.12 * #FLOOR (1481.47 / .12) equals 1481.40
Related Operators: