| Syntax: | CEIL(X[, S]) |
| CEILING(X[, S]) | |
| XLCEILING(X, S) |
X = a numeric value
S = significance parameter
CEIL returns the smallest integer that is greater than
or equal to X. If the optional significance parameter
S is specified, CEIL returns X rounded up
to the nearest multiple of S. When S is omitted
it is assumed to be 1. The mathematical formula
is given by:
CEILING is a synonym for CEIL. XLCEILING is designed to be compatible with the Excel CEILING function. It is functionally equivalent to CEIL, except that the parameter S is required.
If both X and S are specified, they must have the same sign, or an error is generated. S should not be set to 0. This will produce an error in CEIL. XLCEILING will return 0 in this case for consistency with the undocumented behavior of Excel's CEILING function.
Examples:
CEIL(5.5) = 6
CEIL(3.14159, 0.01) = 3.15
CEIL(E3) = -9, where E3 = -9.99
XLCEILING(-9.99, 1) = Error!
XLCEILING(-9.99, -1) = -10
CEILING(-9.99, -1) = -10 (in Excel compatibility mode)
CEILING(C17) = 1, where C17 = 1
Excel function: XLCEILING is compatible with Excel's CEILING (In Excel compatibility mode, the ``XL'' prefix is not used.)