WEBcnx 2023.2 is out now bringing with it a host of new features and performance enhancements. Read more.

Open navigation

MROUND Function

Applies from Version:WEBcnx 2024.1Applies 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

  1. 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.
  2. The number and multiple arguments must have the same sign. If not, MROUND returns an error.


Examples 

ExpressionDescriptionResult
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


Further Reading

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

You may like to read -