Applies from Version: | WEBcnx 2024.1 | Applies to Version: |
Description
MROUND returns a number rounded to the desired multiple.
Syntax
MROUND(number, multiple)
The MROUND function has the following arguments:
- number Required. The value to round.
- multiple Required. The multiple to which you want to round number.
Returns
A rounded number
Remarks
- MROUND rounds up, away from zero, if the remainder of dividing number by multiple is greater than or equal to half the value of multiple.
- The number and multiple arguments must have the same sign. If not, MROUND returns an error.
Examples
Expression | Description | Result |
---|---|---|
MROUND(10, 3) | Rounds 10 to the nearest multiple of 3. | 9 |
MROUND(-10, -3) | Rounds -10 to the nearest multiple of -3. | -9 |
MROUND(1.3, 0.2) | Rounds 1.3 to the nearest multiple of 0.2. | 1.4 |
MROUND(5, -2) | Returns an error because -2 and 5 have different signs. | Error |