(1).创建一个宏:
选择Excel选单下的“工具→宏→录制新宏”选项;
宏名为:MyMacro;
快捷键为:Ctrl+Shift+J(只要不和Excel本身的快捷键重名就行);
保存在:个人宏工作簿(可以在所有Excel工作簿中使用)。
(2).用鼠标选择“停止录入”工具栏中的方块,停止录入宏。
(3).选择Excel选单下的“工具→宏→Visual Basic编辑器”选项。
(4).在“Visual Basic编辑器”左上角的VBA Project中用鼠标双击VBAProject(Personal.xls)打开“模块→Module1” 。
注意:你的模块可能不是Module1 ,也许是Module2、Module3。
(5).在右侧的代码窗口中将Personal.xls-Module1(Code)中的代码更改为:
Sub MyMacro( )
OldValue = Val(ActiveCell.Value)
InputValue = InputBox(“输入数值,负数前输入减号”,“小小计算器”)
ActiveCell.Value = Val(OldValue+InputValue)
End Sub
(6).关闭Visual Basic编辑器。
编辑完毕,你可以试试刚刚编辑的宏,按下Shift+Ctrl+J键,输入数值并按下“确定”键。
标签:excel累加技巧总结
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Excel提取括号内数字实例加公式剖析
2023-08-21 01:59:43
word快速更换字体颜色
2022-02-28 03:27:07
![](https://img.aspxhome.com/file/2023/4/34694_0s.gif)
钉钉蚂蚁分工在哪?钉钉电脑版蚂蚁分工打开方法简述
2022-12-13 08:17:52
![](https://img.aspxhome.com/file/2023/7/a330030_0s.jpg)
excel中验算公式使用实例
2023-05-21 00:47:07
![](https://img.aspxhome.com/file/2023/6/41706_0s.jpg)
excel表格怎么查看任意一网页中的数据?
2022-09-09 02:32:28
![](https://img.aspxhome.com/file/2023/0/41480_0s.jpg)
Win10系统自带的应用程序打不开怎么办?
2022-04-13 17:37:21
![](https://img.aspxhome.com/file/2023/26/a220330_0s.jpg)
Mac怎么提高色彩对比度?Mac提高色彩对比度教程
2022-05-19 17:01:10
![](https://img.aspxhome.com/file/2023/2/a214452_0s.jpg)
wps文档怎样添加页码
2023-07-18 23:25:38
越狱后借助插件 NiceBarx 修改状态栏显示内容教程
2022-11-02 11:17:35
![](https://img.aspxhome.com/file/2023/3/a195783_0s.png)
怎么将系统迁移到固态硬盘?
2023-11-16 02:25:03
![](https://img.aspxhome.com/file/2023/27/a236238_0s.png)
chemdraw怎么画分子式_使用chemdraw画结构式教程
2023-12-06 08:52:06
![](https://img.aspxhome.com/file/2023/5/a314325_0s.png)
XP系统升级至Windows7的10大注意事项
2023-08-23 16:50:16
Win10怎么关闭数字签名?Win10关闭数字签名的步骤教程
2023-12-14 07:17:57
![](https://img.aspxhome.com/file/2023/5/51635_0s.png)
Excel怎么做下拉页面
2023-07-13 15:27:24
进程管理器中的chrome.exe *32是什么意思?
2022-10-01 19:46:34
在Word2007文档中修改剪贴画关键字
2023-12-08 00:12:42
win10系统steam错误代码7如何应对?
2022-11-03 17:58:19
![](https://img.aspxhome.com/file/2023/4/a305933_0s.png)
在word2010中怎么添加分节符
2023-12-08 10:53:20
![](https://img.aspxhome.com/file/2023/3/19623_0s.jpg)
PPT制作卷轴展看的动画效果
2023-02-04 04:29:10
![](https://img.aspxhome.com/file/2023/10/a346958_0s.gif)
微软官方放出Win8.1 Update 1下载地址及Win8.1 Update1正式版更新特性
2023-09-19 01:16:29
![](https://img.aspxhome.com/file/2023/29/a255260_0s.jpg)