Documentation/Calc Functions/MROUND

Function name:
MROUND

Category:
Mathematical

Summary:
Rounds one real number to the nearest integer multiple of a second real number.

Syntax:
MROUND(Number; Multiple)

Returns:
Returns a real number that is the rounded value.

Arguments:
Number is a real number, or a reference to a cell containing that number, that is the value to be rounded.

Multiple is a real number, or a reference to a cell containing that number, that is the multiple to be used in the rounding. The sign of the Multiple argument is not significant.


 * If either Number or Multiple is non-numeric, then MROUND reports a #VALUE! error.
 * If Multiple is equal to 0, then MROUND returns the value 0.

Additional details:

 * For real x and y (y <>0), MROUND implements the following formula:

$$\text { MROUND }(x, y)~=~y\times \text{ ROUND }\left(\frac{x}{y}\right)$$

Related LibreOffice functions:
ROUND

ODF standard:
Section 6.17.4, part 2

Equivalent Excel functions:
MROUND