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 0. 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.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
Uporabno?
Omejitev znakov: 250
Zgornja omejitev znakov je 250.
Hvala za povratne informacije.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.