Difference between revisions of "Manuals/calci/MROUND"
Jump to navigation
Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="4SpaceContent" align="left"><div class="ZEditBox" align=...") |
|||
Line 1: | Line 1: | ||
− | + | =MROUND(number, multiple)= | |
− | + | *Where 'number' is the number to round and | |
+ | *'multiple' is the number of digits to which the number is to be rounded. | ||
− | + | ROUND() rounds a number to specified number of digits. | |
− | |||
− | |||
− | + | == Description == | |
− | + | MROUND(number, multiple) | |
− | |||
− | |||
− | + | This function is used to round a number to certain number of digits mentioned in the argument. | |
− | + | For Example, | |
− | |||
− | |||
− | |||
− | |||
− | + | MROUND(3.6712,2) ''returns 3.67'' as a result. | |
− | + | MROUND(411.3,-1) ''returns 410'' as a result. | |
− | |||
− | |||
− | |||
− | |||
− | '' | + | *If 'num_of_digits' is omitted, Calci assumes it to be zero and rounds the number to the nearest integer. |
+ | *The number is rounded to the specified number of decimal places, if num_of_digits > 0. | ||
+ | *The number is rounded to the nearest integer, if num_of_digits = 0. | ||
+ | *The number is rounded to the left of the decimal point, if num_of_digits < 0. | ||
+ | *If any argument is non-numeric, Calci displays #NaN error message. | ||
− | + | MROUND() can also be used for multiple number array as - | |
− | + | MROUND(2.5..6..0.5) that rounds the numbers 2.5 to 6 in steps of 0.5. | |
− | |||
− | |||
− | + | {| class="wikitable" | |
− | + | |- | |
− | + | ! Number !! MROUND | |
− | + | |- | |
− | + | | 2.5 || 3 | |
− | + | |- | |
− | + | | 3 || 3 | |
− | -- | + | |- |
− | + | | 3.5 || 4 | |
− | + | |- | |
− | + | | 4 || 4 | |
+ | |- | ||
+ | | 4.5 || 5 | ||
+ | |- | ||
+ | | 5 || 5 | ||
+ | |- | ||
+ | | 5.5 || 6 | ||
+ | |- | ||
+ | | 6 || 6 | ||
+ | |- | ||
+ | |} | ||
− | + | *ROUNDUP() can be used to round a number away from zero. | |
+ | *ROUNDDOWN() can be used to round a number towards zero. | ||
+ | *MROUND() can be used to round a number to desired multiple. | ||
− | + | == Examples == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div id="6SpaceContent" class="zcontent" align="left"> | <div id="6SpaceContent" class="zcontent" align="left"> | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
− | + | | class=" " | '''Function''' | |
− | + | | class=" " | '''Output''' | |
− | + | ||
− | | class=" " | | ||
− | | class=" " | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" | MROUND(3.6712,2) | |
− | | class="sshl_f" | | + | | class="sshl_f" | 3.67 |
− | | class="sshl_f" | 3 | + | |
− | |||
− | |||
|- class="even" | |- class="even" | ||
− | + | | class="sshl_f" | MROUND(99.37,0) | |
− | + | | class="sshl_f" | 99 | |
− | | class="sshl_f" | | + | |
− | | class="sshl_f" | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" | MROUND(99.37) | |
− | | class="sshl_f | + | | class="sshl_f" | 99 |
− | + | ||
− | | class="sshl_f" | | ||
− | |||
− | |||
|- class="even" | |- class="even" | ||
− | + | | class="sshl_f" | MROUND(145.8,-1) | |
− | | class="sshl_f" | | + | | class="sshl_f" | 150 |
− | | class="sshl_f" | | + | |
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" | MROUND(-89.65,1) | |
− | + | | class="sshl_f" | -89.7 | |
− | | class="sshl_f" | | + | |
− | | class="sshl_f" | | ||
− | |||
|- class="even" | |- class="even" | ||
− | + | | class="sshl_f" | MROUND(-89.65,-1) | |
− | + | | class="sshl_f" | -90 | |
− | |||
− | | class="sshl_f" | | ||
− | | class="sshl_f" | | ||
|} | |} | ||
− | + | == See Also == | |
− | + | ||
− | + | *[[Manuals/calci/ROUND | ROUND]] | |
+ | |||
+ | *[[Manuals/calci/ROUNDDOWN | ROUNDDOWN]] | ||
+ | |||
+ | *[[Manuals/calci/ROUNDUP | ROUNDUP]] | ||
+ | |||
+ | *[[Manuals/calci/INT | INT]] | ||
+ | |||
+ | *[[Manuals/calci/TRUNC | TRUNC]] | ||
+ | |||
+ | *[[Manuals/calci/CEILING | CEILING]] | ||
+ | |||
+ | *[[Manuals/calci/FLOOR | FLOOR]] | ||
+ | |||
+ | ==References== | ||
+ | |||
+ | *[http://en.wikipedia.org/wiki/Rounding Round Function] |
Revision as of 15:35, 3 December 2013
MROUND(number, multiple)
- Where 'number' is the number to round and
- 'multiple' is the number of digits to which the number is to be rounded.
ROUND() rounds a number to specified number of digits.
Description
MROUND(number, multiple)
This function is used to round a number to certain number of digits mentioned in the argument.
For Example,
MROUND(3.6712,2) returns 3.67 as a result.
MROUND(411.3,-1) returns 410 as a result.
- If 'num_of_digits' is omitted, Calci assumes it to be zero and rounds the number to the nearest integer.
- The number is rounded to the specified number of decimal places, if num_of_digits > 0.
- The number is rounded to the nearest integer, if num_of_digits = 0.
- The number is rounded to the left of the decimal point, if num_of_digits < 0.
- If any argument is non-numeric, Calci displays #NaN error message.
MROUND() can also be used for multiple number array as -
MROUND(2.5..6..0.5) that rounds the numbers 2.5 to 6 in steps of 0.5.
Number | MROUND |
---|---|
2.5 | 3 |
3 | 3 |
3.5 | 4 |
4 | 4 |
4.5 | 5 |
5 | 5 |
5.5 | 6 |
6 | 6 |
- ROUNDUP() can be used to round a number away from zero.
- ROUNDDOWN() can be used to round a number towards zero.
- MROUND() can be used to round a number to desired multiple.