Export (0) Print
Expand All

MROUND Function

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns a number rounded to the desired multiple.

MROUND(<number>, <multiple>)

Term

Definition

number

The number to round.

multiple

The multiple of significance to which you want to round the number.

A decimal number.

MROUND rounds up, away from zero, if the remainder of dividing number by the specified multiple is greater than or equal to half the value of multiple.

Description

The following expression rounds 1.3 to the nearest multiple of .2. The expected result is 1.4.

Code

=MROUND(-1.3,0.2)

Description

The following expression rounds -10 to the nearest multiple of -3. The expected result is -9.

Code

=MROUND(-10,-3)

Description

The following expression returns an error, because the numbers have different signs.

Code

=MROUND(5,-2)
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft