MROUND

The MROUND function rounds a number to the nearest multiple of a specified factor. If the number to be rounded is halfway between two multiples then MROUND rounds away from zero. Both arguments are number values.

MROUND(num-to-round, factor)

num-to-round: The number to be rounded.

factor: The number to use to determine the closest multiple. factor must have the same sign as num-to-round.

Examples

=MROUND(2, 3) returns 3, the multiple of 3 nearest to 2.

=MROUND(4, 3) returns 3, the multiple of 3 nearest to 4.

=MROUND(4.4999, 3) returns 3, the multiple of 3 nearest to 4.4999.

=MROUND(4.5, 3) returns 6, the multiple of 3 nearest to 4.5.

=MROUND(-4.4999, -3) returns -3, the multiple of -3 nearest to -4.4999.

=MROUND(-4.5, -3) returns -6, the multiple of -3 nearest to -4.5.

=MROUND(-4.5, 3) returns an error, as both arguments must be positive or negative.

See also
CEILING
EVEN
FLOOR
INT
ODD
ROUND
ROUNDDOWN
ROUNDUP
TRUNC