WorksheetFunction.Ceiling_Precise Method

Returns the specified number rounded 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 Ceiling_Precise ( _
    Arg1 As Double, _
    Arg2 As Object _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Double
Dim Arg2 As Object
Dim returnValue As Double

returnValue = instance.Ceiling_Precise(Arg1, _
    Arg2)
double Ceiling_Precise(
    double Arg1,
    Object Arg2
)

Parameters

  • Arg2
    Type: System.Object

    Significance - the multiple to which you want to round.

Return Value

Type: System.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.

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.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace