Edit

Share via


WorksheetFunction.Ceiling_Precise(Double, Object) Method

Definition

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

public double Ceiling_Precise (double Arg1, object Arg2);
Public Function Ceiling_Precise (Arg1 As Double, Optional Arg2 As Object) As Double

Parameters

Arg1
Double

Number - the value you want to round.

Arg2
Object

Significance - the multiple to which you want to round.

Returns

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.

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

-/-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.

Applies to