Excel用条件格式高亮显示含有公式的单元格
时间:2023-07-01 22:34:00
通过单击菜单“编辑→定位→定位条件→公式”的方法可以定位所有含有公式的单元格,但这个方法不能让含有公式的单元格长期保持高亮状态而一目了然。Excel本身没有提供这个功能,我们可以使用自定义函数和条件格式的方法来实现这个目的。以Excel 2003为例,具体步骤如下:
1.自定义函数:
按Alt+F11,打开VBA编辑器,在“工程”窗口中选择当前工作表,单击菜单“插入→模块”,Excel自动插入名称为“模块1”的模块,双击“模块1”,在右侧的代码窗口中输入:
Function HasFormula(rCell As Range) As Boolean
Application.Volatile
HasFormula = rCell.HasFormula
End Function
这样就定义了一个自定义函数HasFormula()。关闭VBA编辑器。
2.单击菜单“编辑→定位→定位条件→公式”,Excel将选择所有含有公式的单元格。这时在表格的左上方看到第一个含有公式的单元格名称,此处为J7。
3.单击菜单“格式→条件格式”,单击“条件1”下的下拉列表,选择“公式”,然后在右侧文本框中输入“=HasFormula(J7)”,J7为第一个含有公式的单元格。
单击“格式”按钮,选择一种单元格格式,本例中将单元格底纹设置为淡蓝色。最后单击两次“确定”。
这时,我们可以看到,所有含有公式的单元格都按设置高亮显示出来了。
标签:Excel,用,条件,格式,高亮,显示,含有,公式,的
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
word自动保存的设置
2022-06-29 00:52:14
PPT怎么设计扁平化长阴影文字字体?PPT设计扁平化长阴影文字字体
2022-12-25 21:31:31
![](https://img.aspxhome.com/file/2023/10/a352608_0s.png)
word怎么做目录和页码
2022-12-16 23:57:57
![](https://img.aspxhome.com/file/2023/7/35097_0s.png)
word2019文档中简体中文转换为繁体字的方法图解教程
2022-11-06 02:53:35
![](https://img.aspxhome.com/file/2023/9/35119_0s.jpg)
excel如何输入身份证号码_excel表格怎么弄身份证号码
2023-11-07 18:50:14
![](https://img.aspxhome.com/file/2023/4/a312620_0s.png)
Win8系统下wifi显示网络受限如何解决?
2022-10-10 16:57:43
![](https://img.aspxhome.com/file/2023/2/a291118_0s.png)
糗事百科如何加群?糗事百科加群教程
2022-04-18 18:11:27
![](https://img.aspxhome.com/file/2023/8/a336644_0s.jpg)
在Word2003中怎样添加文档修订备注修改内容
2023-02-24 01:12:35
PPT怎么导入ai中的素材?
2022-04-30 22:23:37
![](https://img.aspxhome.com/file/2023/10/a345885_0s.jpg)
搜狗输入法自造词语-手机搜狗输入法自造词删除方法
2022-11-13 15:07:41
![](https://img.aspxhome.com/file/2023/3/a293463_0s.jpg)
Win7怎么卸载IE浏览器?
2022-07-01 08:39:55
![](https://img.aspxhome.com/file/2023/27/a231054_0s.jpg)
excel批量修改文件名的神技巧
2023-11-16 08:41:32
![](https://img.aspxhome.com/file/2023/8/a140888_0s.jpg)
WPS2019怎么做工资职级核定表? WPS工资职级核定表模板的做法
2022-06-06 12:24:27
![](https://img.aspxhome.com/file/2023/3/a165753_0s.jpg)
如何移动和复制文件?Dropzone有效的提高操作效率!
2023-07-05 22:32:46
![](https://img.aspxhome.com/file/2023/2/a212052_0s.jpeg)
VBA快速处理上标
2023-07-14 16:46:01
![](https://img.aspxhome.com/file/2023/6/a142566_0s.jpg)
win10修复引导工具怎么用?win10修复引导工具使用方法教程
2023-11-06 10:24:27
![](https://img.aspxhome.com/file/2023/1/47771_0s.png)
AS SSD怎么用?
2023-11-28 11:21:33
![](https://img.aspxhome.com/file/2023/2/a290475_0s.jpg)
Mac电脑上哪个解压缩软件最好用?MAC上好用的解压缩软件分享
2022-09-23 15:03:59
![](https://img.aspxhome.com/file/2023/8/a212358_0s.jpeg)
PPT制作箭头改变颜色的动画效果的方法
2022-01-26 08:58:47
![](https://img.aspxhome.com/file/2023/10/a350400_0s.png)
excel如何绘制表格
2023-11-28 22:29:38