[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

MROUND

Syntax:

MROUND ( x , multiple)

Description: Computes x rounded to multiple, away from zero. It rounds up if the remainder of dividing x by multiple is greater than or equal to half the value of multiple; otherwise, it rounds down.

Arguments:

Name

Type

Description

x

number

The value to round.

multiple

number

The multiple to which x is to be rounded.

 

Return Type and Value: number – x rounded to multiple.

However, if x and multiple have different signs, #NUM! is returned.

[Example:

MROUND(10,3) rounds 10 to a nearest multiple of 3; that is, to 9
MROUND(-10,-3) rounds -10 to a nearest multiple of -3; that is, to -9
MROUND(1.3,0.2) rounds 1.3 to a nearest multiple of 0.2; that is, to 1.4

end example]