跳至主要内容

如何在 Excel 中将一系列单元格除以某个数字?

Author: Tech Support Last Modified: 2025-07-31

有时,您可能需要快速修改 Excel 中的一系列单元格。例如,如果您有一份产品价格列表,并希望将所有价格除以 2,该如何高效地完成此操作呢?本教程提供了逐步的方法来将一系列单元格除以某个数字。让我们详细探讨每种方法。

A screenshot showing a range of cells divided by a number in Excel

使用“选择性粘贴”功能将一系列单元格除以某个数字

使用 Kutools for Excel 快速将一系列单元格除以某个数字

使用 VBA 代码将一系列单元格除以某个数字


使用“选择性粘贴”功能将一系列单元格除以某个数字

例如,我将使用 Excel 的“选择性粘贴”功能把所有单元格除以数字 15,您可以按照以下步骤完成此任务:

1. 在空白单元格中插入除数 15 并复制它。

2. 选中要除以 15 的区域并右键单击,从菜单中选择“选择性粘贴”。

3. 在“选择性粘贴”对话框中,点击“粘贴”下的“全部”选项。

A screenshot of the Paste Special dialog box in Excel with Divide selected

4. 删除之前输入的数字 15。

现在,这些单元格区域已经被除以 15。请参见截图:

A screenshot showing a range of cells divided by a number in Excel

 


使用 Kutools for Excel 快速将一系列单元格除以某个数字

如果“选择性粘贴”方法对您来说有些困难,是否有更简单、更快捷的方式来处理此任务?是的,Kutools for Excel 的“运算工具”功能可以在几秒钟内帮助您将一系列单元格除以某个数字!

Kutools for Excel 提供了超过 300 种高级功能,简化复杂任务,提升创造力与效率。 通过集成 AI 能力,Kutools 能够精准自动执行任务,让数据管理变得轻松简单。Kutools for Excel 的详细信息...         免费试用...

1. 选择要除以特定数字的单元格区域,然后点击“Kutools” > “更多” > “运算工具”,请参见截图:

A screenshot of the Kutools menu highlighting the Operation option

3. 在“运算工具”对话框中,在“操作”框中选择“除法”,在“操作数”框中输入除数(如“15”)。您可以通过“预览”窗格查看结果。最后,点击“确定”或“应用”按钮。请参见截图:

A screenshot of the Kutools Operation Tools dialog box with Division selected

注意:如果您还想创建公式,请勾选“创建公式”选项。如果所选单元格包含公式,并且您不想除以公式的计算结果,请勾选“忽略公式单元格”选项。

Kutools for Excel - 通过超过300个必备工具,让Excel功能大幅提升。永久免费享受AI功能!立即获取


使用 VBA 代码将一系列单元格除以某个数字

通过 VBA 代码,您还可以自动将一系列单元格除以某个数字。

1. 选择要被某个数字除的区域。

2. 点击“开发工具” > “Visual Basic”,会弹出一个新的“Microsoft Visual Basic for Applications”窗口,点击“插入” > “模块”,然后在模块中输入以下代码:

VBA:将一系列单元格除以某个数字

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. 然后点击 A screenshot of the Run button in the VBA editor 按钮运行代码。在弹出的对话框中,请选择要除以某个数字的单元格区域,然后点击“确定”按钮。请参见截图:

A screenshot of the VBA code dialog box for selecting a range to divide

4. 在第二个弹出的对话框中,输入除数,然后点击“确定”按钮。请参见截图:

A screenshot of the VBA code dialog box for entering the divisor number

现在,所选区域中的所有数字都被数字 15 除。

A screenshot showing a range of cells divided by a number in Excel


演示:使用 Kutools for Excel 快速将一系列单元格除以某个数字

Kutools for Excel:超过 300 种实用工具触手可及!永久免费享受 AI 功能!立即下载!