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

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial content)
 
m
Line 3: Line 3:
 
== ROUNDUP ==
 
== ROUNDUP ==
 
Rounds a number up, away from zero, to a certain precision.
 
Rounds a number up, away from zero, to a certain precision.
 
  
 
=== Syntax: ===
 
=== Syntax: ===
Line 10: Line 9:
  
 
: 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 27: Line 25:
 
<tt>'''ROUNDUP(987.65; -2)'''</tt>
 
<tt>'''ROUNDUP(987.65; -2)'''</tt>
 
: 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 '''Tools - Options - OpenOffice.org Calc - Calculate''' to check the display precision.  
 
  
 
=== See also: ===
 
=== See also: ===

Revision as of 06:31, 2 March 2008


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.org Calc - Calculate to check the display precision.

See also:

INT, TRUNC, ROUND, ROUNDDOWN

CEILING, FLOOR, EVEN, ODD, MROUND

Mathematical functions

Personal tools