Bewerken

Delen via


WorksheetFunction.Round(Double, Double) Method

Definition

Rounds a number to a specified number of digits.

public:
 double Round(double Arg1, double Arg2);
public double Round (double Arg1, double Arg2);
Public Function Round (Arg1 As Double, Arg2 As Double) As Double

Parameters

Arg1
Double

Number - the number you want to round.

Arg2
Double

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

Returns

Remarks

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

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

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

Applies to