How to Add a ROUND Formula to Multiple Cells in Excel – 2 Methods

This is the sample dataset.

Add Round Formula to Multiple Cells in Excel


Method 1 – Dragging the Fill Handle Icon to Apply the ROUND Formula

Steps

  • Select D5 and enter the following formula:
=ROUND(B5,0)

D5 displays the rounded version of the number in B5.

Dragging Fill Handle Icon to Add Round Formula to Multiple Cells in Excel

  • Drag down the Fill Handle to the rest of the cells.

Dragging Fill Handle Icon to Add Round Formula to Multiple Cells in Excel

D5:D12 displays the rounded version of the numbers in B5:B12.

Dragging Fill Handle Icon to Add Round Formula to Multiple Cells in Excel


Method 2 – Embedding a VBA Macro to Round Multiple Cells in Excel

Steps

  • Go to the Developer tab and click Visual Basic.

Embedding VBA Macro to Add Round Formula to Multiple Cells in Excel

  • Click Insert > Module

Add-Round-Formula-to-Multiple-Cells-in-Excel-4

  • In the Module window, enter the following code:
Sub Mul_round_formula()

Dim x As Range
Dim y As Range
Dim z As Integer

On Error Resume Next
xTitleId = "Enter Range of the Cells to be Rounded"

Set y = Application.Selection
Set y = Application.InputBox("Range", xTitleId, y.Address, Type:=8)
z = Application.InputBox("Decimal", xTitleId, Type:=1)

For Each x In y
    x.Value = Application.WorksheetFunction.Round(x.Value, z)
Next

End Sub

Embedding VBA Macro to Add Round Formula to Multiple Cells in Excel

  • Close the window.
  • Go to the View tab > Macros > View Macros.

  • In View Macros, select the macro you created, here Mul_round_formula.
  • Click Run.

  • In the new window, enter the range you want to round, here $C$6:$C$12.
  • Click OK.

  • In the new window, enter 0, to make the number round to the closest integer.
  • Click OK.

C5:C12 is rounded to the nearest integer.

 

Read More: How to Roundup a Formula Result in Excel


How to Round Multiple Cells without the ROUND Formula in Excel

Steps

  • Copy the values in B5:B12 to D5:D12.

Round Numbers in Excel without Formula

  • Select the values and right-click.
  • Click Format Cells.

Round Numbers in Excel without Formula

  • Select the Number tab and click Number.
  • Set the Decimal places to 0.
  • See the preview in Sample.
  • Click OK.

Round Numbers in Excel without Formula

The values in C5:C12 are rounded.

Round Numbers in Excel without Formula


Download Practice Workbook

Download the practice workbook below.


Related Articles


<< Go Back to Rounding in Excel | Number Format | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Rubayed Razib Suprov
Rubayed Razib Suprov

Rubayed Razib, holding a BSC degree in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, serves as a devoted member of the ExcelDemy project. He has contributed significantly by authoring numerous articles and showcasing proficiency in VBA. Razib efficiently automates Excel challenges using VBA macros and actively participates in the ExcelDemy forum, providing valuable solutions for user interface challenges. Apart from creating Excel tutorials, he is interested in Data Analysis with MS Excel,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo