Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

VBScript Round Function

VBScript Round Function


VBScript reference manual Complete VBScript Reference Manual


The Round function rounds a number.

Syntax

Round(expression[,numdecimalplaces])

Parameters Description
expression Required. The numeric expression to be rounded.
numdecimalplaces Optional. Specifies how many digits to the right of the decimal point to round to. The default is 0.

Example

Example 1

The example above produces the following output:

24

25

Try it »

Example 2

How to round a number to 2 decimal places:

The example above produces the following output:

24.13

Try it »


VBScript reference manual Complete VBScript Reference Manual