WorksheetFunction.Floor Method

Rounds number down, toward zero, to the nearest multiple of significance.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Floor ( _
    Arg1 As Double, _
    Arg2 As Double _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Double
Dim Arg2 As Double
Dim returnValue As Double

returnValue = instance.Floor(Arg1, Arg2)
double Floor(
    double Arg1,
    double Arg2
)

Parameters

  • Arg1
    Type: System.Double

    Number - the numeric value you want to round.

  • Arg2
    Type: System.Double

    Significance - the multiple to which you want to round.

Return Value

Type: System.Double

Remarks

Important

This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. This function is still available for compatibility with earlier versions of Excel. However, if backward compatibility is not required, you should consider using the new functions from now on, because they more accurately describe their functionality. For more information about the new function, see the Floor_Precise(Double, Object) method.

If either argument is nonnumeric, Floor returns the #VALUE! error value.

If number and significance have different signs, Floor returns the #NUM! error value.

Regardless of the sign of number, a value is rounded down when adjusted away from zero. If number is an exact multiple of significance, no rounding occurs.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace