Round Function
Syntax
Round([Num][, Places])
Group
Description
Returns the number rounded to the specified number of decimal places.
Parameters
| Parameters | Description |
|---|---|
| Num | Rounds this numeric value. If this value is Null, Null is returned. |
| Places | Rounds to this number of decimal places. If this is omitted, it rounds to the nearest integer value. |
Example
Sub Main Debug.Print Round(.5) ' 0 Debug.Print Round(.500001) ' 1 Debug.Print Round(1.499999) ' 1 Debug.Print Round(1.5) ' 2 Debug.Print Round(11.11) ' 11 Debug.Print Round(11.11,1) ' 11.1 End Sub