OpenOffice3.org Calc 3. Mathematical Functions
CEILING(Number; Significance; Mode) Function
Returns the numeric value that is closer
to the argument “Number” and that is a multiple of the argument “Significance”.
The argument “number” contains a numeric value or a reference to a cell
containing a number. Indicates the amount to approximate or rounded.
The argument “Significance” contains a numeric value or a reference to a cell
that has a number. The function returns the number that is a multiple of the
argument “Significance”. The argument “Mode” is optional, contains an integer
that determines how the function calculates the result. The argument “Mode”
affects the result only when the first two arguments are negative numbers.
If the arguments “Number” and “Significance” are positive numbers, the function
returns a value greater that or equal, closer to the first argument, which is a
multiple of the argument “Significance”. In this case, no matter what value to
take the argument “Mode”.
On the other hand, if the two arguments “number” and “significance” are negative
values, in addition, if the argument “Mode” is zero or omitted, the function
returns a number greater than or equal, closer to the first argument, which is a
multiple of the argument “Significance”.
The third possibility that can happen is this: if the first two arguments are
negative numbers, also, if the argument “Mode” is a number different from
zero the function returns a number less than or equal, closest to the argument
“Number” which is a multiple of the argument “Significance”.
=CEILING(38;4;1) Returns 40. The value returned is the highest number and closer
to 38 that is a multiple of 4. Note that 40 is multiple of 4.
=CEILING(-39;-5;0) Returns -35. The returned value is hegher and closer to -39,
which is a multiple of -5.
=CEILING(-39;-5;1) Returns -40. In this case, the function returns the smaller
number closer to -39 and that is a multiple of -5.. The result varies with the
argument “Mode”.
=CEILING(30;-2;1) Returns the error value Err:502. The first two arguments have
different signs, the first argument is positive, while the second is negative.