WorksheetFunction.Ceiling_Precise method (Excel)

Returns the specified number rounded to the nearest multiple of significance.

Syntax

expression.Ceiling_Precise (Arg1, Arg2)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data type Description
Arg1 Required Double Number - the value that you want to round.
Arg2 Optional Variant Significance - 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 the significance argument is omitted, the value 1.0 is used.

Depending on the sign of the number and significance arguments, the Ceiling_Precise method rounds either away from or towards zero.

Sign (Arg1/Arg2) Rounding
-/- Rounds toward zero.
+/+ Rounds away from zero.
-/+ Rounds toward zero.
+/- Rounds away from zero.

If either argument is nonnumeric, Ceiling_Precise generates an error.

If number is an exact multiple of significance, no rounding occurs.

Note

The CEILING.PRECISE algorithm is the same as the one used for the ISO.CEILING function.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.