Returns a number that is a multiple of the second parameter and at the same time is nearest to the first parameter. This function rounds up (away from zero) if the remainder of the division is greater than or equal to half of the value of the second parameter.
Overloads
MRound(Number,Number)
MRound(Currency,Number)
MRound(Currency,Currency)
Parameters
Note: Regardless of the positive/negative sign of the second parameter, the result of the function takes the positive/negative sign of the first parameter.
Return value
A number.
Expression
Take MRound(Currency,Number) for an example:
MRound(Currency,Number) = Number*(Integer(Currency/Number) + (1 if Remainder(Currency/Number) >=Number/2, otherwise 0)
Examples