WorksheetFunction.Ceiling Method

Excel Developer Reference

Returns number rounded up, away from zero, to the nearest multiple of significance.

Syntax

expression.Ceiling(Arg1, Arg2)

expression   A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data Type Description
Arg1 Required Double The value you want to round.
Arg2 Required Double The multiple to which you want to round.

Return Value
Double

Remarks

For example, if you want to avoid using pennies in your prices and your product is priced at $4.42, use the formula =Ceiling(4.42,0.05) to round prices up to the nearest nickel.

  • If either argument is nonnumeric, Ceiling generates 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 and significance have different signs, Ceiling generates an error.

See Also