CEILING

The CEILING function rounds a number up to the nearest significant multiple (toward infinity).

Syntax

CEILING(
    number,
    significance
)

Parameters
  • number: Number to be rounded.
  • significance: Value towards which the indicated number will be rounded.
Returned value

The CEILING function returns in whole or real number format the number rounded according to the given arguments. If number is in currency format, the function returns a number in the same format.

Additional Information

The CEILING function considers the number to be rounded and returns the number multiple of significance closest to number and greater than or equal to it. For example, the function applied to the number 3.71 with the significance argument 0.05, returns the multiple of 0.05 that is closest to 3.71 that is greater than or equal to this number. That is, it returns 3.75:

CEILING function. Example of use

"Higher" in this context means tending to positive infinity (that is, for a negative value it means closer to zero).

Logically, if significance takes the value 1, the result will be the integer closest to number that is greater than or equal to it:

CEILING function. Example of use

If significance takes the value 2, the result will always be a multiple of this figure:

CEILING function. Example of use

If significance is zero, the result is always 0. If significance is True, it is considered a value of 1 for this argument, and if it is False, it is considered a value of 0.

If number is a positive value, significance must be a number greater than zero. Conversely, if number is a negative value, significance can be both positive and negative. If positive, number will be rounded to plus infinity. If it is negative, it will be rounded to minus infinity.

Examples

The following example shows the price of several products rounded to the nearest multiple of € 0.5 greater than or equal to each of them:

CEILING function. Example of use

Related functions
Scenarios
Category
Mathematical and trigonometric
Submitted by admin on Tue, 12/04/2018 - 12:31