Difference between revisions of "Manuals/calci/ROUND"

From ZCubes Wiki
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=...")
 
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
<div style="font-size:30px">'''ROUND(Number,Decimals)'''</div><br/>
  
Syntax
+
*Where 'Number' is the number to round and
 +
*'Decimals' is the number of digits to which the number is to be rounded.
 +
**ROUND() rounds a number to specified number of digits.
  
</div></div>
+
== Description ==
----
 
<div id="4SpaceContent" align="left"><div class="ZEditBox" align="justify">
 
  
Remarks
+
ROUND(Number,Decimals)
  
</div></div>
+
This function is used to round a number to certain number of digits mentioned in the argument.
----
 
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
 
  
Examples
+
For Example,
  
</div></div>
+
ROUND(3.6712,2) ''returns 3.67'' as a result.
----
 
<div id="8SpaceContent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman">''''''''''''<font size="6"> </font>''' '''''''''</font>'''</div></div>
 
----
 
<div id="11SpaceContent" align="left"><div class="ZEditBox mceEditable" align="justify">
 
  
<font size="5">Description</font>
+
ROUND(411.3,-1) ''returns 410'' as a result.
  
</div></div>
+
*If 'Decimals' 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 Decimals > 0.
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman"> <font size="6">ROUND</font> </font>'''</div></div>
+
*The number is rounded to the nearest integer, if Decimals = 0.
----
+
*The number is rounded to the left of the decimal point, if Decimals < 0.
<div id="3SpaceContent" class="zcontent" align="left"><br /><div id="7Space" class="gamizbox" title="7Space"><div id="7SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="7SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="7SpaceRollupContent" align="center"></span></span></div><div id="7SpaceCover"><div id="7SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="3" face="Times New Roman"> </font>
+
*If any argument is non-numeric, Calci displays #NaN error message.
  
'''ROUND''' ('''N''',Nd)
+
ROUND() can also be used for multiple number array as -
  
'''N'''   is the number which is to round and Nd specifies the number of digits.
+
ROUND(2.5..6..0.5) that rounds the numbers 2.5 to 6 in steps of 0.5.
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Number !! ROUND
 +
|-
 +
| 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></div>
 
----
 
 
<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=" " |
+
| class="  " | '''Function'''
| Column1
+
| class="  " | '''Output'''
| class="      SelectTD SelectTD" |
+
 
<div id="6Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>Column2
 
| class="  " | Column3
 
| class="  " |
 
| Column4
 
|
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| class="sshl_f" | ROUND(3.6712,2)
| class="sshl_f" | 3.6712
+
| class="sshl_f" | 3.67
| class="sshl_f" | 2
+
 
| class="sshl_f" |
 
|
 
|
 
|
 
 
|- class="even"
 
|- class="even"
| class="  " | Row2
+
| class="sshl_f" | ROUND(99.37,0)
| class="sshl_f" | 3.67
+
| class="sshl_f" | 99
| class="sshl_f" |
+
 
| class="sshl_f" |
 
|
 
|
 
|
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="sshl_f" | ROUND(99.37)
| class="sshl_f" |
+
| class="sshl_f" | 99
| class="sshl_f" |
+
 
| class="sshl_f" |
 
|
 
|
 
|
 
 
|- class="even"
 
|- class="even"
| Row4
+
| class="sshl_f" | ROUND(145.8,-1)
| class="sshl_f" |
+
| class="sshl_f" | 150
|
+
 
|
 
|
 
|
 
|
 
 
|- class="odd"
 
|- class="odd"
| Row6
+
| class="sshl_f" | ROUND(-89.65,1)
| class="sshl_f" |
+
| class="sshl_f" | -89.7
|
+
 
|
+
|- class="even"
|
+
| class="sshl_f" | ROUND(-89.65,-1)
|
+
| class="sshl_f" | -90
| class="   " |
 
<div id="6Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
 
|}
 
|}
  
<div align="left"></div>''''''</div></div>
+
==Related Videos==
----
+
 
<div id="13SpaceContent" class="zcontent" align="left"><br /><br /><div id="1Space" class="gamizbox" title="1Space"><div id="1SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="1SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="1SpaceRollupContent" align="center"></span></span></div><div id="1SpaceCover"><div id="1SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">
+
{{#ev:youtube|_MIn3zFkEcc|280|center|ROUNDING DECIMALS}}
 +
 
 +
== See Also ==
 +
 
 +
*[[Manuals/calci/MROUND | MROUND]]
 +
 
 +
*[[Manuals/calci/ROUNDDOWN | ROUNDDOWN]]
 +
 
 +
*[[Manuals/calci/ROUNDUP | ROUNDUP]]
  
<font size="3">·</font>        <font size="3"><font face="Times New Roman">When Nd is greater than zero,the number is rounded to the specified number of decimal places. </font></font>
+
*[[Manuals/calci/INT | INT]]
  
<font size="3">·</font>        <font size="3"><font face="Times New Roman">When  Nd is 0, the number is rounded to the nearest integer. </font></font>
+
*[[Manuals/calci/TRUNC | TRUNC]]
  
<font size="3">·</font>        <font size="3"><font face="Times New Roman">When Nd  is less than 0, the number is rounded to the left of the decimal point. </font></font>
+
*[[Manuals/calci/CEILING | CEILING]]
  
<font size="3" face="Times New Roman"> </font>
+
*[[Manuals/calci/FLOOR | FLOOR]]
  
</div></div>
+
==References==
----
 
<div id="14SpaceContent" class="zcontent" align="left"><br /><br /><br /><div id="5Space" class="gamizbox" title="5Space"><div id="5SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="5SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="5SpaceRollupContent" align="center"></span></span></div><div id="5SpaceCover"><div id="5SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="3"><font face="Times New Roman">Rounds a number to a specified number of digits.</font></font></div></div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left"><br /><br /><br /><div id="9Space" class="gamizbox" title="9Space"><div id="9SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="9SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="9SpaceRollupContent" align="center"></span></span></div><div id="9SpaceCover"><div id="9SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">
 
  
<font size="3"><font face="Times New Roman">Let’s see an example in (Column1 Row 1,Column2Row1)</font></font>
+
*[http://en.wikipedia.org/wiki/Rounding Round Function]
  
<font size="3">ROUND (N,Nd)</font>
 
  
<font size="3">ROUND (C1R1,C2R1)</font>
 
  
<font size="3">i.e. =ROUND(3.6712,2) is 3.67</font>
+
*[[Z_API_Functions | List of Main Z Functions]]
  
</div></div>
+
*[[ Z3 |  Z3 home ]]
----
 
</div></div></div></div></div></div></div></div></div></div></div>
 

Latest revision as of 16:33, 21 August 2018

ROUND(Number,Decimals)


  • Where 'Number' is the number to round and
  • 'Decimals' is the number of digits to which the number is to be rounded.
    • ROUND() rounds a number to specified number of digits.

Description

ROUND(Number,Decimals)

This function is used to round a number to certain number of digits mentioned in the argument.

For Example,

ROUND(3.6712,2) returns 3.67 as a result.

ROUND(411.3,-1) returns 410 as a result.

  • If 'Decimals' 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 Decimals > 0.
  • The number is rounded to the nearest integer, if Decimals = 0.
  • The number is rounded to the left of the decimal point, if Decimals < 0.
  • If any argument is non-numeric, Calci displays #NaN error message.

ROUND() can also be used for multiple number array as -

ROUND(2.5..6..0.5) that rounds the numbers 2.5 to 6 in steps of 0.5.

Number ROUND
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

Function Output
ROUND(3.6712,2) 3.67
ROUND(99.37,0) 99
ROUND(99.37) 99
ROUND(145.8,-1) 150
ROUND(-89.65,1) -89.7
ROUND(-89.65,-1) -90

Related Videos

ROUNDING DECIMALS

See Also

References