How to Divide a Group of Cells by a Number in Excel (3 Methods)

While performing some calculations in Microsoft Excel, we need to divide a group of cells by a number. We can divide a cell or the group of cells easily in Excel. Today’s task is to divide a group of cells by a number. In this article, we’ll learn three quick and suitable ways to divide a group of cells by a number in Excel effectively with appropriate illustrations.


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


3 Suitable Ways to Divide a Group of Cells by a Number in Excel

Let’s say, we have a dataset that contains information about several sales representatives of the Armani group. The type of products and the revenue earned by the sales representatives are given in columns C, and D respectively. We will divide revenue earned by a number 12. We can easily do that by using the paste special command, the SUM function, and VBA macros also. Here’s an overview of the dataset for today’s task.

divide a group of cells by a number in excel


1. Use the Paste Special Command to Divide a Group of Cells by a Number in Excel

We will use the Paste Special command to divide a group of cells by a number in Excel. This is the easiest and time-saving way. Here, we’ll divide the revenue earned by the sales representatives by a number 12. Let’s follow the steps below to learn!

Step 1:

  • First of all, select the number 12 and copy it by using the keyboard shortcuts Ctrl + C. Then select the cells array which is divided by 12.

Use the Paste Special Command to Divide a Group of Cells by a Number in Excel

  • After that, from your Home tab, go to,

Home → Clipboard → Paste → Paste Special

Step 2:

  • Hence, a Paste Special dialog box will appear in front of you. From that window, firstly, select the Divide option from the Operation At last, press OK.

Use the Paste Special Command to Divide a Group of Cells by a Number in Excel

  • After completing the above process, you will be able to divide the group of cells titled revenue earned by a number 12 that has been given in the below screenshot.

Read More: How to Lock a Group of Cells in Excel (7 Different Methods)


2. Apply the SUM Function to Divide a Group of Cells by a Number in Excel

Now, we will apply the SUM function to divide a group of cells by a number. This is the easiest way to divide a group of cells by a number. Firstly, we will sup up the group of cells D5 to D14 by using the SUM function. Then we divide the output of the SUM function by 25. Let’s follow the instructions below to learn!

Step 1:

=SUM(D5:D14)

Apply the SUM Function to Divide a Group of Cells by a Number in Excel

  • Hence, press Enter on your keyboard and you will get $6,440,830 as the return of the SUM function.

Step 2:

  • Again, select cell D18 to divide the value of cell D16. Now type the below formula in that cell.
=D16/D17

Apply the SUM Function to Divide a Group of Cells by a Number in Excel

  • Further, again, simply press Enter on your keyboard and you will get $257,633.20 as the return of the formula.

Apply the SUM Function to Divide a Group of Cells by a Number in Excel

Read More: How to Group Cells in Excel (6 Different Ways)


Similar Readings


3. Run a VBA Code to Divide a Group of Cells by a Number in Excel

In this method, we will divide a group of cells by a number by applying the VBA Code. Applying the VBA code to divide a group of cells by a number is the easiest and the time-saving also. Let’s follow the instructions below to learn!

Step 1:

  • First of all, from your Developer tab, go to,

Developer → Visual Basic

Run a VBA Code to to Divide a Group of Cells by a Number in Excel

  • After clicking on the Visual Basic ribbon, a window named Microsoft Visual Basic for Applications – Divide a Group of cells by a Number will instantly appear in front of you. From that window, we will insert a module for applying our VBA code. To do that, go to,

Insert → Module

Step 2:

  • Hence, the Divide a Group of cells by a Number module pops up. In the Divide a Group of cells by a Number module, write down the below VBA
Sub Divide_Group_of_Cells()
'UpdatebyRasel_0043
Dim R As Range
Dim WR As Range
Dim i As Integer
On Error Resume Next
xTitleId = "Divide a Group of Cells"
Set WR = Application.Selection
Set WR = Application.InputBox("Range", xTitleId, WR.Address, Type:=8)
i = Application.InputBox("Division num", xTitleId, Type:=1)
For Each R In WR
    R.Value = R.Value / i
Next
End Sub

Run a VBA Code to to Divide a Group of Cells by a Number in Excel

  • After that, run the VBA To do that, go to,

Run → Run Sub/UserForm

  • After running the code, a dialog box named Divide a Group of cells will appear instantly in front of you. From the Divide a Group of cells dialog box, type $D$5:$D$14 in the Range Then press OK.

Run a VBA Code to to Divide a Group of Cells by a Number in Excel

  • By pressing OK, a new dialog box pops up and in that dialog box, write down 20 in the Division num. At last, press OK.

Run a VBA Code to to Divide a Group of Cells by a Number in Excel

Step 3:

  • After completing the above process, you will be able to divide a group of cells by a number 20 which has been given below screenshot.

Run a VBA Code to to Divide a Group of Cells by a Number in Excel

Read More: How to Move a Group of Cells in Excel (4 Easy Ways)


Things to Remember

👉 #DIV/0 error occurs when the denominator is 0 or the reference of the cell is not valid.


Conclusion

I hope all of the suitable methods mentioned above to divide a group of cells by a number will now provoke you to apply them in your Excel spreadsheets with more productivity. You are most welcome to feel free to comment if you have any questions or queries.


Related Articles

Md. Abdur Rahim Rasel

Md. Abdur Rahim Rasel

Hi! I'm Md. Abdur Rahim Rasel. Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to this. I have completed my graduation in Naval Architecture and Marine Engineering(NAME) from Bangladesh University of Engineering and Technology(BUET). I have a passion for learning new things with my knowledge through perseverance and hard work.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo