Difference between revisions of "Documentation/How Tos/Calc: ROUNDDOWN function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(Initial content) |
m |
||
Line 3: | Line 3: | ||
== ROUNDDOWN == | == ROUNDDOWN == | ||
Rounds a number down, toward zero, to a certain precision. | Rounds a number down, toward zero, to a certain precision. | ||
− | |||
=== Syntax: === | === Syntax: === | ||
Line 10: | Line 9: | ||
: This function rounds ''towards zero''. See '''[[Documentation/How_Tos/Calc: ROUNDUP function|ROUNDUP]]''' and '''[[Documentation/How_Tos/Calc: ROUND function|ROUND]]''' for alternatives. | : This function rounds ''towards zero''. See '''[[Documentation/How_Tos/Calc: ROUNDUP function|ROUNDUP]]''' and '''[[Documentation/How_Tos/Calc: ROUND function|ROUND]]''' for alternatives. | ||
− | |||
=== Example: === | === Example: === | ||
Line 24: | Line 22: | ||
<tt>'''ROUNDDOWN(987.65; -2)'''</tt> | <tt>'''ROUNDDOWN(987.65; -2)'''</tt> | ||
: returns <tt>'''900'''</tt> | : returns <tt>'''900'''</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
ROUNDDOWN
Rounds a number down, toward zero, to a certain precision.
Syntax:
ROUNDDOWN(number; places)
- returns number rounded down (towards zero) to places decimal places. If places is omitted or zero, the function rounds down to an integer. If places is negative, the function rounds down to the next 10, 100, 1000, etc.
Example:
ROUNDDOWN(1.234; 2)
- returns 1.23
ROUNDDOWN(45.67; 0)
- returns 45
ROUNDDOWN(-45.67)
- returns -45
ROUNDDOWN(987.65; -2)
- returns 900
If these examples do not seem to work, see Tools - Options - OpenOffice.org Calc - Calculate to check the display precision.