MROUND function

MROUND(number, multiple) MROUND(number; multiple)

number

Number or { Number }

The input number.

multiple

Number or { Number }

The multiple to which the input number should be rounded.

Returns

Number or { Number }

A rounded number.

Returns a number rounded to a multiple of another number.

Examples

MROUND(13, 4)MROUND(13; 4)

Returns 12, which is the closest multiple of 4 to 13.

MROUND(15, 4)MROUND(15; 4)

Returns 16, which is the closest multiple of 4 to 15.

MROUND(16, 4)MROUND(16; 4)

Returns 16, as 16 is already a multiple of 4.

MROUND({ 16, 21 }, 4)MROUND({ 16; 21 }; 4)

Returns the array { 16, 20 }{ 16; 20 }, with 16 already being a multiple of 4 and 20 being the closest multiple of 4 to 21.