WorksheetFunction.Round Method (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Rounds a number to a specified number of digits.

expression .Round(Arg1, Arg2)

expression A variable that represents a WorksheetFunction object.

Parameters

Name

Required/Optional

Data Type

Description

Arg1

Required

Double

Number - the number you want to round.

Arg2

Required

Double

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

Return Value

Double

  • 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.

Show: