VBA Round Function: The Round function in VBA rounds a number to a specified number of decimal places and returns the number.

Syntax

Parameter

Number (required) –This parameter represents a numeric value one wants to round.

NumDigitsAfterDecimal (optional) – This parameter represents a positive integer stating the number of decimal places that you want to round to. By default, it is set to 0.

Return

This function returns a rounded number to the specified number of decimals.

Example 1

Output

58

VBA Round Function

Example 2

Output

58.78

VBA Round Function

Example 3

Output

VBA Round Function

Pin It on Pinterest

Share This