Rediger

Del via


WorksheetFunction.Floor_Precise method (Excel)

Rounds the specified number to the nearest multiple of significance.

Syntax

expression.Floor_Precise (Arg1, Arg2)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data type Description
Arg1 Required Double Number - the numeric value that you want to round.
Arg2 Optional Variant Significance - the multiple to which you want to round.

Return value

Double

Remarks

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

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

If either argument is nonnumeric, the Floor_Precise method generates an error.

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

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.