Created
October 17, 2018 06:55
-
-
Save DuongAQ/6222c161f2087eeef7ad7ba24a4a6e88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub RoundNum() | |
'Updateby20140128 | |
Dim Rng As Range | |
Dim WorkRng As Range | |
Dim xNum As Integer | |
On Error Resume Next | |
xTitleId = "KutoolsforExcel" | |
Set WorkRng = Application.Selection | |
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8) | |
xNum = Application.InputBox("Decimal", xTitleId, Type:=1) | |
For Each Rng In WorkRng | |
Rng.Value = Application.WorksheetFunction.Round(Rng.Value, xNum) | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment