Excel CEILING Function
Basic Description
The Excel Ceiling function rounds a supplied number up or down, away from zero, to the nearest multiple of a given number.
The syntax of the function is:
Where the arguments are as follows:
| number | - | The initial number |
| significance | - |
The multiple of significance that the supplied number should be rounded to. (should generally have the same arithmetic sign (positive or negitive) as the supplied number argument) |
Positive and Negative Arguments
Note: In Excel 2003 & 2007, the significance argument must have the same arithmetic sign (positive or negative) as the initial number argument. However, in Excel 2010, the Ceiling function has been improved, so that it can now handle a negative number argument and a positive significance argument. In this case, the Ceiling function reverses the direction of the rounding (ie. rounds the supplied number towards zero).
Ceiling Function Examples
The following spreadsheet shows the Excel Ceiling function used with several different significance values, on the positive and negative numbers 22.25 and -22.25.
The format of the functions is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right.
|
Formulas:
|
Results:
|
The above examples show how, when the number and the significance arguments have the same arithmetic sign, the Ceiling function rounds the supplied number away from zero.
Examples with Positive and Negative Arguments
Different combinations of positive and negative arguments, are shown in the Excel 2010 spreadsheet below.
|
Formulas:
|
Results:
|
This example shows how:
- a positive number argument and a negative significance argument results in an error
- a negative number argument and a positive significance argument results in an error in Excel 2007 and earlier, but in Excel 2010, is handled by reversing the direction of the rounding (i.e. rounding the negative number towards zero)
Further information on the Excel Ceiling Function is provided on the Microsoft Office website.
Ceiling Function Error
If you get an error from the Excel Ceiling function, this is likely to be one of the following :
| #NUM! | - |
Occurs :
|
||||||
| #DIV/0! | - | Occurs if the supplied significance argument = 0 | ||||||
| #VALUE! | - | Occurs if either of the supplied arguments is non-numeric |