Round

concerns

The Round function rounds the specified number to the desired number of decimal places. The rounding takes place mathematically, i.e. decimal places are rounded upwards from 5.

 

Syntax

Round(Value, [Digits])

Return value

Type

Description

Double

Rounded number

Parameter

Use

Name

Type

Passing

Description

Required

Value

Double

ByVal

Value for determining the rounding value

Optional

Digits

Variant

ByVal

Number of decimal places

Example

Dim Radius As Double, Perimeter As Double

Radius := 100

Perimeter := Round(2 * PI * Radius, 2)

 

The perimeter of a circle with a radius of 100 is 628.32 (result rounded to 2 decimal places).