MindFusion.Wpf Pack Programmer's Guide
CEILING

Rounds the specified number up, away from zero, to the nearest multiple of the specified value.

Syntax  Copy Code

CEILING( Number n, [Number significance], [Integer mode = 0] ) Number

Parameters

n
Required. The value to round.
significance
Optional. The multiple to which to round.
mode
Optional. The type of ceiling to perform (see Remarks).

Remarks

If n and significance are not 0 and have different signs, the function returns the #NUM! error value.

If significance is omitted or an empty parameter (two consecutive commas) it is assumed to be -1 if n is negative and +1 if n is non-negative, making the function act like the normal mathematical ceiling function, if mode is not given or zero. If mode is given and not zero, the absolute value of n is rounded away from zero to a multiple of the absolute value of significance and then the sign is applied. If mode is omitted or zero, rounding is toward positive infinity, the number is rounded to the smallest multiple of significance that is equal to or greater than n. If the specified mode value is not an integer, it is automatically truncated.

If any of the two parameters n or significance is zero, the result is zero.

Example

Formula  Copy Code

=CEILING(3.5,1)
=CEILING(0.123,0.01)
=CEILING(-3.5,-1)
=CEILING(-3.5,-1,1)

See Also

Function Reference
FLOOR Function
INT Function
ROUND Function
ROUNDDOWN Function
ROUNDUP Function
TRUNC Function
EVEN Function
ODD Function