Difference between revisions of "Documentation/How Tos/Calc: ROUNDUP function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(See also:)
m
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE:ROUNDUP function}}
 +
{{Documentation/CalcFunc MathematicalTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_ROUNDDOWN_function
 +
|NextPage=Documentation/How_Tos/Calc:_CEILING_function
 +
}}__NOTOC__
  
 
== ROUNDUP ==
 
== ROUNDUP ==
Line 8: Line 13:
 
: returns  <tt>'''number'''</tt> rounded up (away from zero) to <tt>'''places'''</tt> decimal places. If <tt>'''places'''</tt> is omitted or zero, the function rounds up to an integer. If <tt>'''places'''</tt> is negative, the function rounds up to the next <tt>'''10'''</tt>, <tt>'''100'''</tt>, <tt>'''1000'''</tt>, etc.
 
: returns  <tt>'''number'''</tt> rounded up (away from zero) to <tt>'''places'''</tt> decimal places. If <tt>'''places'''</tt> is omitted or zero, the function rounds up to an integer. If <tt>'''places'''</tt> is negative, the function rounds up to the next <tt>'''10'''</tt>, <tt>'''100'''</tt>, <tt>'''1000'''</tt>, etc.
  
: This function rounds ''away from zero''. See '''[[Documentation/How_Tos/Calc: ROUNDDOWN function|ROUNDDOWN]]''' and '''[[Documentation/How_Tos/Calc: ROUND function|ROUND]]''' for alternatives.
+
: This function rounds ''away from zero''. See [[Documentation/How_Tos/Calc: ROUNDDOWN function|ROUNDDOWN]] and [[Documentation/How_Tos/Calc: ROUND function|ROUND]] for alternatives.
  
 
=== Example: ===
 
=== Example: ===
Line 26: Line 31:
 
: returns <tt>'''1000'''</tt>
 
: returns <tt>'''1000'''</tt>
  
If these examples do not seem to work, see '''Tools - Options - OpenOffice.org Calc - Calculate''' to check the display precision.  
+
If these examples do not seem to work, see {{menu|Tools|Options|OpenOffice Calc|Calculate}} to check the display precision.  
  
=== See also: ===
+
{{SeeAlso|EN|
'''[[Documentation/How_Tos/Calc: INT function|INT]]''',
+
* [[Documentation/How_Tos/Calc: INT function|INT]]
'''[[Documentation/How_Tos/Calc: TRUNC function|TRUNC]]''',
+
* [[Documentation/How_Tos/Calc: TRUNC function|TRUNC]]
'''[[Documentation/How_Tos/Calc: ROUND function|ROUND]]''',
+
* [[Documentation/How_Tos/Calc: ROUND function|ROUND]]
'''[[Documentation/How_Tos/Calc: ROUNDDOWN function|ROUNDDOWN]]'''
+
* [[Documentation/How_Tos/Calc: ROUNDDOWN function|ROUNDDOWN]]
 
+
* [[Documentation/How_Tos/Calc: CEILING function|CEILING]]
'''[[Documentation/How_Tos/Calc: CEILING function|CEILING]]''',
+
* [[Documentation/How_Tos/Calc: FLOOR function|FLOOR]]
'''[[Documentation/How_Tos/Calc: FLOOR function|FLOOR]]''',
+
* [[Documentation/How_Tos/Calc: EVEN function|EVEN]]
'''[[Documentation/How_Tos/Calc: EVEN function|EVEN]]''',
+
* [[Documentation/How_Tos/Calc: ODD function|ODD]]
'''[[Documentation/How_Tos/Calc: ODD function|ODD]]''',
+
* [[Documentation/How_Tos/Calc: MROUND function|MROUND]]
'''[[Documentation/How_Tos/Calc: MROUND function|MROUND]]'''
+
* [[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]]
 
+
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
'''[[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]]'''
+
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
+
[[Category: Documentation/Reference/Calc/Mathematical functions]]
[[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
+
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
+

Latest revision as of 14:42, 31 January 2024

ROUNDUP

Rounds a number up, away from zero, to a certain precision.

Syntax:

ROUNDUP(number; places)

returns number rounded up (away from zero) to places decimal places. If places is omitted or zero, the function rounds up to an integer. If places is negative, the function rounds up to the next 10, 100, 1000, etc.
This function rounds away from zero. See ROUNDDOWN and ROUND for alternatives.

Example:

ROUNDUP(1.1111; 2)

returns 1.12

ROUNDUP(1.2345; 1)

returns 1.3

ROUNDUP(45.67; 0)

returns 46

ROUNDUP(-45.67)

returns -46

ROUNDUP(987.65; -2)

returns 1000

If these examples do not seem to work, see Tools → Options → OpenOffice Calc → Calculate to check the display precision.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_ROUNDUP_function&oldid=259862"
Views
Personal tools
Navigation
Tools
In other languages