Formualizer Docs

CEILING

Rounds a number up to the nearest multiple of a significance.

This implementation defaults significance to 1.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=CEILING(number, significance)

Arguments

ArgumentTypeRequiredDefault
numbernumberRequired—
significancenumberRequired—

Differences from Excel

Formualizer defaults the significance to 1 if it is omitted. Excel requires it.

Remarks

  • If significance is omitted, 1 is used.
  • When both arguments are negative, rounds away from zero; positive significance rounds toward positive infinity.

Error cases

  • significance = 0 returns #DIV/0!.

Examples

Round a fractional number to a multiple of two.

Formula =CEILING(7.2,2)

Expected result 8

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Use a five-unit rounding interval.

Formula =CEILING(7.2,5)

Expected result 10

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A number already at a multiple of the significance stays at that multiple.

Formula =CEILING(8,2)

Expected result 8

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The number argument cannot be read from this text.

Formula =CEILING("invalid",2)

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Round up to the nearest multiple

Formula =CEILING(5.1,2)

Expected result 6

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Round a negative number toward positive infinity

Formula =CEILING(-5.1,2)

Expected result -4

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What happens if CEILING significance is 0?

It returns #DIV/0! because a zero multiple is invalid.

Implementation

Engine source

On this page