Applies from Version: | WEBcnx 2024.1 | Applies to Version: |
Description
Returns number rounded up, away from zero, to the nearest multiple of significance.
Syntax
CEILING(number, significance)
The CEILING function has the following arguments:
- number Required. The value you want to round.
- significance Required. The multiple to which you want to round.
Returns
A rounded number
Remarks
- If either argument is nonnumeric, CEILING returns an error.
- Regardless of the sign of number, a value is rounded up when adjusted away from zero. If number is an exact multiple of significance, no rounding occurs.
- If number is negative, and significance is negative, the value is rounded down, away from zero.
- If number is negative, and significance is positive, the value is rounded up towards zero.
Examples
Expression | Description | Result |
---|---|---|
CEILING(2.5, 1) | Rounds 2.5 up to nearest multiple of 1. | 3 |
CEILING(-2.5, -2) | Rounds -2.5 up to nearest multiple of -2. | -4 |
CEILING(-2.5, 2) | Rounds -2.5 up to nearest multiple of 2. | -2 |
CEILING(1.5, 0.1) | Rounds 1.5 up to the nearest multiple of 0.1. | 1.5 |
CEILING(0.234, 0.01) | Rounds 0.234 up to the nearest multiple of 0.01. | 0.24 |