MROUND returns a number after rounding it to a given multiple. In simple words, it rounds a number to the nearest multiple of a number and while rounding, it doesn’t consider that number is greater or lower than the original number.
- number: a number that you want to round.
- multiple: a number for which you want to find the nearest multiple.
In the following example, we have used different arguments in the MROUND function with the different nearest multiple to round the number.
- 12.5 rounded to 12 to the nearest multiple of 3 is 12.
- 19 is rounded to 20 to the nearest multiple of 5
- 13 is rounded to 12 to the nearest multiple of 6.
- 3.6 is rounded to 2 to the nearest multiple of 4.
- The result is 0 as I have skipped specifying multiple.
- The result is 0 as I have specified 0 as the multiple.
- The result is an error as I have specified -2 as multiple.
- Here we have a tie between 20 and 18, but we get 20 as it always rounds away from zero.
- If you use a zero in the multiple arguments it will return zero in the result.
- Without specifying the multiple arguments, it will return an error in the result.
- It always rounds away from zero if there are two nearest multiples. That means, if you have two multiples on the same distance it will return the multiple which is higher than the number, you are rounding (See Example 8 for Reference).