跳到主要内容

如何在Excel中将值添加到多个单元格?

如果要将值添加到Excel中的多个单元格,则以下方法将帮助您轻松快速地处理它:


箭头蓝色右气泡 使用VBA为多个单元格增值

使用宏可以简化许多重复的处理,并使我们的工作更加轻松快捷。 以下宏也是如此。

步骤1:选择要为其添加值的单元格。

步骤2:按住 ALT + F11 键,并打开“ Microsoft Visual Basic应用程序”窗口。

步骤3:点击 插页 > 模块,然后将以下VBA粘贴到“模块窗口”中。

子Add2Formula()
'加300

对于每个c In选择
c。激活
ActiveCell.FormulaR1C1 =“ =”&ActiveCell.Formula&“ +300”
下一个c

END SUB

步骤4:按下 F5 运行此宏的键。

:

1.此宏仅对其中不包含任何公式的单元格有效。

2.此宏将添加 300 到所有选定的单元格。 如果您想增加其他价值,请更换 300 具有其他价值。


箭头蓝色右气泡 使用 Kutools for Excel 为多个单元格添加值

Kutools for Excel 为我们提供了另一种易于使用的方法,其操作工具可以帮助我们轻松地为多个单元增加价值。

Kutools for Excel 包括80多个便捷的Excel工具。 30天免费试用,不受限制。 立即获取。

步骤1:选择要添加相同值的单元格。

步骤2:点击 库工具 > 操作 > 操作工具...。 看截图:

步骤3:选择 增加 从“操作”部分,然后输入将添加到选定单元格的值。 看截图:

步骤4:检查 创建公式 选项。

步骤5:点击 OK.

在操作工具中,
选择添加,输入300,然后单击确定。.

Kutools for Excel的 操作工具 支持对所有选定单元格进行各种数学运算:

  • 加法:加上指定的操作数。
  • 减法:减去指定的操作数。
  • 乘法:单元格的每个值乘以操作数。
  • 除法:单元格的每个值除以操作数。
  • 指数:单元的每个值都会为操作数供电。
  • 舍入:将单元格的每个值舍入为十进制数字(指定的操作数)。
  • 功能:对每个单元格值应用一个功能。
  • 自定义:创建类似公式的表达式并将其应用于单元格的每个值。

相关文章

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!

Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks a lot. It is working 💖
This comment was minimized by the moderator on the site
If you want to include cells with formula, you could try, which is only a slight modification from the original. But adding numbers to an established formula could be dangerous so beware:


Sub Add2Formula()
' Add a number
Dim formulae As String
Dim a_number As Double

a_number = InputBox("what number to increment")

For Each cell In Selection
cell.Activate
formulae = ActiveCell.Formula
' gets rid of formula non-essentials that could cause errors
formulae = Replace(formulae, "'", "")
formulae = Replace(formulae, "=", "")

If formulae = "" Then
ActiveCell.Formula = "= " & ActiveCell.Formula & "+" & a_number
Else
ActiveCell.Formula = "= " & formulae & "+" & a_number
End If
Next cell

End Sub


This could be easily modified to skip blank cells, and to skip text cells you could probably evaluate the value of the cell, and when it errors you could go to the next cell. Hope this helps.
This comment was minimized by the moderator on the site
How can I get this VBA formula to skip blank and text cells? Thanks
This comment was minimized by the moderator on the site
sir.iam doing survey list in excel if a=200,b=100,c=50,d=15.e=10 for 3 questions if he selects a,b,b means 200+100+100=400 and Description should be good ..how to do this one
This comment was minimized by the moderator on the site
this tool is so useful and can trust the product.
This comment was minimized by the moderator on the site
any reply? will this site answer our enquiry?
This comment was minimized by the moderator on the site
Dear Expert Have a question here. How to increase age automatically for each year? Thanks
This comment was minimized by the moderator on the site
Add Value to multiple cells with VBA's techque is very useful Thanks
This comment was minimized by the moderator on the site
sir if a1=100 b1=100 and after dat we want to insert 100 again in a1 den b1 should automatically update to 200 means a1 value added in b1 and so on and on. how it is possibe we have to take the two cells only. sir plz solve dis problem
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations