﻿

## 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

#### Recommended Productivity Software

Office Tab: Use tabbed interface in Office as the use of web browser Chrome, Firefox and Internet Explorer.
Kutools for Excel: Adds 120 powerful new features to Excel. Increase your productivity in 5 minutes. Save two hours every day!
Classic Menu for Office: Brings back your familiar menus to Office 2007, 2010 and 2013 (includes Office 365).

### Hint

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:

#### 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  button to run the code. And a dialog is displayed for selecting a range to work. See screenshot:

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

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

#### 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.

Related articles:

### Recommended Productivity Tools

The following tools will greatly save your time and effort, which one do you prefer?
Office Tab: Using handy tabs in your Office, as the way of Chrome, Firefox and New Internet Explorer.
Kutools for Excel: 120 powerful new functions for Excel, Increase your productivity in 5 minutes. Save two hours every day!
Classic Menu for Office: Bring back familiar menus to Office 2007, 2010, 2013 and 365, as if it were Office 2000 and 2003.

### Kutools for Excel

Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

More than 120 powerful advanced functions which designed for Excel:

• Merge Cell/Rows/Columns without Losing Data.
• Combine and Consolidate Multiple Sheets and Workbooks.
• Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
• Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,