How to round a range of cells in Excel?
Supposing you have a range of numbers with several decimal places, and now you want to round them with two decimal places. Such as rounding 2.1054 to 2.11. How to round a range of cells in Excel quickly?
Round a range of cells with ROUND function
Round a range of cells with VBA code
Quickly round / round up / round down a range of cells with Kutools for Excel
Round a range of cells with ROUND function
You can use the formula ROUND (number, number-digits) to accomplish this task. For example, I have a range (A2:A10) need to be rounded. Please do as follows:
1. Click a blank cell C2 and input the formula: =ROUND (A2, 2), see screenshot:
2. Then press Enter key, and the value in cell A2 will be rounded to a number with two decimal places. Then drag the fill handle over the range of cells that you want to apply this formula. See screenshot:
Round / Round up / Round down a range of numbers without formula:
With Kutools for Excel's Round feature, you can quickly round, round up, round down or round to even a range of cells as you need without any formulas. Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now! |
Round a range of cells with VBA code
With following VBA code, you can round a range of cells quickly.
1. Select the range you want to round.
2. Click Developer > Visual Basic, a new Microsoft Visual Basic for applications window will be displayed, click Insert > Module, and input the following code into the Module:
VBA: Round a range of cells:
Sub RoundNum()
'Updateby Extendoffice
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
3. Then click button to run the code. Select the range you want to round from the pop-up diallog, See screenshot:
4. Click OK, and then type the number of decimal you want to round in another dialog, see screenshot:
5. Click OK. All of the cells have been rounded with three decimal places. See screenshot:
Quickly round / Round up / round down a range of cells with Kutools for Excel
The Round feature of Kutools for Excel is a very handy tool can solve this problem quickly and comfortably.
Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. |
If you have installed Kutools for Excel, please do as the following steps:
1. Select the range that you want to round, and then click Kutools > Round. See screenshot:
2. In the Round without Formula dialog box, insert the number decimal you want to round based on intot he Decimal place, then select Rounding, Rounding up, Rounding down which you want to use, and then click Ok button, all numbers have been rounded as you need, see screenshot:
Click Download and free trial Kutools for Excel Now !
Demo: Quickly round / round up / round down a range of cells
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!