Difference between revisions of "Manuals/calci/ROUNDUP"

From ZCubes Wiki
Jump to navigation Jump to search
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=ROUNDUP(number, num_of_digits)=
+
<div style="font-size:30px">'''ROUNDUP (number,num_digits)'''</div><br/>
 
 
 
*Where 'number' is the number to round and  
 
*Where 'number' is the number to round and  
 
*'num_of_digits' is the number of digits to which the number is to be rounded.
 
*'num_of_digits' is the number of digits to which the number is to be rounded.
 
+
**ROUNDUP(), rounds a number up, away from zero.
ROUNDUP() rounds a number to specified number of digits away from 0.
 
  
 
== Description ==
 
== Description ==
Line 10: Line 8:
 
ROUNDUP(number, num_of_digits)
 
ROUNDUP(number, num_of_digits)
  
This function is used to round a number up  away from zero, to specified number of decimal digits mentioned in the argument.
+
This function is used to round a number up  away from zero, to the number of decimal digits specified in the argument.
  
 
For Example,
 
For Example,
  
ROUNDUP((67.8,0) ''returns 68'' as a result.
+
ROUNDUP(67.8,0) ''returns 68'' as a result.
  
ROUNDUP((6.83112,3) ''returns 6.832'' as a result.
+
ROUNDUP(6.83112,3) ''returns 6.832'' as a result.
  
*If 'num_of_digits' is omitted, Calci assumes it to be zero and rounds the number to the nearest integer.
+
*If 'num_of_digits' is omitted, Calci displays #NaN error message.
*The number is rounded to the specified number of decimal places, if num_of_digits > 0.
+
*The number is rounded up 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 up 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.
+
*The number is rounded up to the left of the decimal point, if num_of_digits < 0.
 
*If any argument is non-numeric, Calci displays #NaN error message.
 
*If any argument is non-numeric, Calci displays #NaN error message.
  
 
ROUNDUP() can also be used for multiple number array as -
 
ROUNDUP() can also be used for multiple number array as -
  
ROUNDUP(2.5..6..0.5) that rounds the numbers from 2.5 to 6 in steps of 0.5.
+
ROUNDUP(2.55..7.55,1) that rounds the numbers 2.55 to 7.55 to one decimal place.
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Number !! ROUNDUP
+
! Number !! Num_of_digits !! ROUNDUP
|-
 
| 2.5 || 3
 
 
|-
 
|-
| 3 || 3
+
| 2.55 || 1 || 2.6
 
|-
 
|-
| 3.5 || 4
+
| 3.55 || 1 || 3.6
 
|-
 
|-
| 4 || 4
+
| 4.55 || 1 || 4.6
 
|-
 
|-
| 4.5 || 5
+
| 5.55 || 1 || 5.6
 
|-
 
|-
| 5 || 5
+
| 6.55 || 1 || 6.6
 
|-
 
|-
| 5.5 || 6
+
| 7.55 || 1 || 7.6
|-
 
| 6 || 6
 
 
|-
 
|-
 
|}
 
|}
Line 54: Line 48:
 
*MROUND() can be used to round a number to desired multiple.
 
*MROUND() can be used to round a number to desired multiple.
  
 +
== Examples ==
  
 +
<div id="6SpaceContent" class="zcontent" align="left">
  
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
{| id="TABLE3" class="SpreadSheet blue"
 +
|- class="even"
 +
| class=" " | '''Function'''
 +
| class=" " | '''Output'''
  
Syntax
+
|- class="odd"
 +
| class="sshl_f" | ROUNDUP(7.6712,2)
 +
| class="sshl_f" | 7.68
  
</div></div>
+
|- class="even"
----
+
| class="sshl_f" | ROUNDUP(388.345,0)
<div id="4SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
| class="sshl_f" | 389
  
Remarks
+
|- class="odd"
 +
| class="sshl_f" | ROUNDUP(199.37,-1)
 +
| class="sshl_f" | 200
  
</div></div>
+
|- class="even"
----
+
| class="sshl_f" | ROUNDUP(-9.95,1)
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
| class="sshl_f" | -10
  
Examples
+
|- class="odd"
 +
| class="sshl_f" | ROUNDUP(-9.95,-1)
 +
| class="sshl_f" | -10
 +
|}
  
</div></div>
+
==Related Videos==
----
 
<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>
+
{{#ev:youtube|_MIn3zFkEcc|280|center|ROUNDING DECIMALS}}
  
</div></div>
+
== See Also ==
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman"> <font size="6">ROUNDUP</font> </font>'''</div></div>
 
----
 
<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">
 
  
'''ROUNDUP''' ('''n''',''' digit''')
+
*[[Manuals/calci/ROUNDDOWN | ROUNDDOWN]]
  
'''n'''   is a number that you want rounded down.
+
*[[Manuals/calci/ROUND | ROUND]]
 
 
'''ndigit''' is the number of digits to which you want to round number.
 
 
 
</div></div>
 
----
 
<div id="6SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| Column1
 
| class="    " | Column2
 
| class="  " | Column3
 
| class="  " |
 
| Column4
 
|
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f" | 67.8
 
| class="sshl_f" | 6.83112
 
| class="sshl_f" | 2245888.56
 
|
 
|
 
|
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | 0
 
| class="sshl_f" | 3
 
| class="sshl_f" | -4
 
|
 
|
 
|
 
|- class="odd"
 
| Row3
 
| class="sshl_f" | 68
 
| class="sshl_f" | 6.832
 
| class="sshl_f" | 2250000
 
|
 
|
 
|
 
|- class="even"
 
| Row4
 
|
 
|
 
| 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>
 
|
 
|
 
|
 
|- class="odd"
 
| Row6
 
|
 
|
 
|
 
|
 
|
 
| 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>
+
*[[Manuals/calci/MROUND | MROUND]]
----
 
<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">
 
  
·          n is rounded up to the specified number of decimal places if ndigit is greater than 0.
+
*[[Manuals/calci/INT | INT]]
  
·          n is rounded up to the nearest integer if ndigit is 0.
+
*[[Manuals/calci/TRUNC | TRUNC]]
  
·          n  is rounded up to the left of the decimal point if ndigit is less than 0.
+
*[[Manuals/calci/CEILING | CEILING]]
  
</div></div>
+
*[[Manuals/calci/FLOOR | FLOOR]]
----
 
<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">
 
  
ROUNDUP functions rounds a number up, away from 0.
+
==References==
  
</div></div>
+
*[http://en.wikipedia.org/wiki/Rounding Round Function]
----
 
<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">
 
  
1.       If n = 67.8 and ndigit =0, then<br />=ROUNDUP(67.8,0) gives you 68
 
  
2.       If n = 6.83112 and ndigit =3, then<br />=ROUNDUP(6.83112,3) gives you 6.832
 
  
3.       If n = 2245888.56 and ndigit = -4, then<br />=ROUNDUP(2245888.56,-4) gives you 2250000
+
*[[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:35, 21 August 2018

ROUNDUP (number,num_digits)


  • Where 'number' is the number to round and
  • 'num_of_digits' is the number of digits to which the number is to be rounded.
    • ROUNDUP(), rounds a number up, away from zero.

Description

ROUNDUP(number, num_of_digits)

This function is used to round a number up away from zero, to the number of decimal digits specified in the argument.

For Example,

ROUNDUP(67.8,0) returns 68 as a result.

ROUNDUP(6.83112,3) returns 6.832 as a result.

  • If 'num_of_digits' is omitted, Calci displays #NaN error message.
  • The number is rounded up to the specified number of decimal places, if num_of_digits > 0.
  • The number is rounded up to the nearest integer, if num_of_digits = 0.
  • The number is rounded up to the left of the decimal point, if num_of_digits < 0.
  • If any argument is non-numeric, Calci displays #NaN error message.

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

ROUNDUP(2.55..7.55,1) that rounds the numbers 2.55 to 7.55 to one decimal place.

Number Num_of_digits ROUNDUP
2.55 1 2.6
3.55 1 3.6
4.55 1 4.6
5.55 1 5.6
6.55 1 6.6
7.55 1 7.6
  • ROUND() can be used to round a number to specified number of digits.
  • ROUNDDOWN() can be used to round a number towards zero.
  • MROUND() can be used to round a number to desired multiple.

Examples

Function Output
ROUNDUP(7.6712,2) 7.68
ROUNDUP(388.345,0) 389
ROUNDUP(199.37,-1) 200
ROUNDUP(-9.95,1) -10
ROUNDUP(-9.95,-1) -10

Related Videos

ROUNDING DECIMALS

See Also

References