How to divide a range of cells by a number in Excel?

Sometimes, we may need to modify a range of cells in Excel quickly. For example, I have a range of cells which containing the prices of a group of products, and I want to divide all the prices by 2, and now here comes the question, how can I quickly divide a range of cells by a number?

Divide a range of cells by a number with Paste Special function

Divide a range of cells by a number with VBA code

Quickly divide a range of cells by a number with Kutools for Excel

Kutools for Excel: add 120 new features in Excel. Save one hour every day.
Classic Menu for Office: brings back classic menus to Office 2010 and 2013 (includes Office 365).
Office Tab: brings tabbed interface to Office as the use of web browser Chrome, Firefox and Internet Explorer.

arrow blue right bubble Divide a range of cells by a number with Paste Special function

Hot
Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

For example, I will divide all the cells by a number 15, using Paste Special function of Excel, you can accomplish this task with the following steps:

1. Insert the number 15 into an empty cell and copy it.

2. Highlight the range that you want to divide the number 15. Then right-click, choose Paste Special from the menu.

3. In the Paste Special dialog box, click All option from Paste, and click Divide option from Operation.

4. Then click OK. And delete the number 15.

5. The range of cells has been divided by 15. See screenshots:


arrow blue right bubble Divide a range of cells by a number with VBA code

With the VBA code, you can also divide a range cells by a number automatically.

1. Select the range you want it to be divided by a number.

2. Click Developer > Visual Basic, a new Microsoft Visual Basic for applications window will display, click Insert > Module, and then input the following code in the Module:

VBA: Divide a range of cells by a number.

Sub DivisionNum()
'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("Division num", xTitleId, Type:=1)
For Each Rng In WorkRng
Rng.Value = Rng.Value / xNum
Next
End Sub

3. Then click doc-divide-5 button to run the code. And a dialog is displayed for selecting a range to work. See screenshot:

doc-divide-a-rang-6

4. Click Ok, and type the divide number in another pop-up dialog, see screenshot:

doc-divide-a-rang-6

5. Click Ok, and the numbers in the selected range are divided by 15.


arrow blue right bubble Quickly divide a range of cells by a number with Kutools for Excel

Perhaps the VBA code is somewhat difficult for you, is there an easy and quick method to deal with this work?

Kutools for Excel: with more than 120 handy Excel add-ins, free to try with no limitation in 30 days. Get it Now

After installing Kutools for Excel, please do as this:

1. Highlight the range numbers that you want to be divided.

2. Click Kutools > More > Operation Tools, see screenshot:

3. In the Operation Tools dialog box, select Division from Operation, input the number 15 in the Operand box. And you can see the results from the Preview Pane. See screenshot:

4. Then click OK or Apply.

Note: If you want to create formulas as well, please check Create formulas option. If the selected cells include formulas, and you don’t want to divide the calculated results of the formula, please check Skip formula cells option.

To know more about this feature click here.


Related articles:


Kutools for Excel

More than 120 Advanced Functions for Excel 2013, 2010, 2007 and Office 365.

screen shot

btn read more     btn download     btn purchase

Add comment


Security code
Refresh