CEILING

Rounds a number (away from zero) to a multiple of another number

Usage

CEILING(number, [multiple_of])

Parameters

number

(Required) The number

multiple_of

The multiple to round to (by default 1). If number is negative, then multiple_of can be negative to inverse the rounding. (So to round toward negative infinity)

Examples

Example With these variables Result

CEILING(10)

(None)

10

CEILING(10.1)

(None)

11

CEILING(number)

number is -3.3

-3

CEILING(10.1, 2)

(None)

12

CEILING(10.1, 0.5)

(None)

10.5

CEILING(-10.1, 0.5)

(None)

-10

CEILING(-10.1, -0.5)

(None)

-10.5

More information

If number is already a multiple of multiple_of, then number is returned as is.

Reminders

A text containing digits is not handled as a number. To have an actual number:

  • use the @NUMBER_QUESTION to set the variable
  • write a numeric value directly in the code without quotes, ex: age >= 18
  • use a function which converts to a number: NUMBER(text_containing_numbers)
  • use a function which returns a number: FIND("world", "hello everybody")

See also