The Excel function MROUND
is used to round a number to an interval other than a power of 10.
These examples show MROUND
to the nearest quarter and to the nearest even number.
Starting with | MROUND(b,0.25) | MROUND(b,2) |
---|---|---|
23.93195211 | 24.00 | 24 |
2.793135388 | 2.75 | 2 |
21.93903064 | 22.00 | 22 |
13.74193739 | 13.75 | 14 |
16.77047412 | 16.75 | 16 |
13.03922302 | 13.00 | 14 |
17.06132896 | 17.00 | 18 |
16.11741694 | 16.00 | 16 |
33.48249592 | 33.50 | 34 |
37.29656687 | 37.25 | 38 |
A similar result can be obtained using the EVEN
and ODD
functions which round a number up to the nearest even or odd number respectively.