Share via


WorksheetFunction.RoundUp Method

Rounds a number up, away from 0 (zero).

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

Syntax

'Declaration
Function RoundUp ( _
    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.RoundUp(Arg1, Arg2)
double RoundUp(
    double Arg1,
    double Arg2
)

Parameters

  • Arg1
    Type: System.Double

    Number - any real number that you want rounded up.

  • Arg2
    Type: System.Double

    Num_digits - the number of digits to which you want to round number.

Return Value

Type: System.Double

Remarks

RoundUp behaves like Round(Double, Double), except that it always rounds a number up.

If num_digits is greater than 0 (zero), then number is rounded up to the specified number of decimal places.

If num_digits is 0, then number is rounded up to the nearest integer.

If num_digits is less than 0, then number is rounded up to the left of the decimal point.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace