excel用颜色标记包含数组公式的单元格
时间:2022-05-13 06:54:16
当工作表中包含大量多单元格数组公式时,有时为了方便编辑这些数组公式,可能希望将工作表中的数组公式单独标记出来,以区分非数组公式,这时可以用下面的VBA代码来实现。
选择包含数组公式的工作表,按Alt+F11,打开VBA编辑器,在右侧代码窗口中输入下列代码:
Sub ColorArray()
Dim rCell As Range
For Each rCell In ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormulas)
If rCell.HasArray Then rCell.Interior.ColorIndex = 37
Next rCell
End Sub
运行上述代码,活动工作表中所有包含数组公式的单元格就会用浅蓝色标记出来。
标签:excel,用,颜色,标记,包含,数组,公式,的,单元格
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Excel中工作表多列数据合并一列的操作方法
2022-06-20 07:42:47
Excel数据汇总计算
2022-01-28 12:44:46
word分栏怎么对齐
2022-06-07 15:27:07
![](https://img.aspxhome.com/file/2023/1/34571_0s.gif)
Word中按姓氏笔画排列名单的操作方法
2022-09-20 03:18:56
Excel表格提示向程序发送命令时出现问的解决办法
2022-06-16 03:23:15
![](https://img.aspxhome.com/file/2023/5/37465_0s.jpg)
Win10电脑怎么设置隐藏设置?教你快速设置隐藏设置
2023-11-17 22:55:54
![](https://img.aspxhome.com/file/2023/1/49951_0s.png)
Excel2013怎么用红灯图标记录工作情况?
2023-02-28 18:59:19
![](https://img.aspxhome.com/file/2023/0/36060_0s.jpg)
Excel 公式 #NUM! 错误 解决方法
2022-03-14 14:34:06
![](https://img.aspxhome.com/file/2023/3/a140723_0s.png)
excel2010表格数据怎么制作框架图图表?
2022-10-03 20:19:25
![](https://img.aspxhome.com/file/2023/4/40104_0s.png)
word中如何快速输入特定的短语
2023-05-01 22:21:30
excel表格筛选后复制粘贴结果的方法
2022-09-10 01:16:10
![](https://img.aspxhome.com/file/2023/6/37176_0s.jpg)
word中图片如何调整大小
2022-07-12 05:53:29
![](https://img.aspxhome.com/file/2023/5/32995_0s.jpg)
Word中2003版进行图片设置背景的操作方法
2023-10-24 01:31:52
word中怎样设置图片高度宽度
2023-04-11 18:52:18
在Word2007中取消指定文档段落的断字功能
2023-12-09 00:52:33
![](https://img.aspxhome.com/file/2023/9/20589_0s.jpg)
Excle如何颜色筛选
2022-10-09 14:22:48
Word怎么自动生成图表目录?
2022-05-01 08:59:33
![](https://img.aspxhome.com/file/2023/3/31223_0s.png)
word默认的文档格式为什么
2022-07-19 15:28:40
![](https://img.aspxhome.com/file/2023/9/32199_0s.png)
6.3 理解Excel的ADO
2023-06-11 15:10:08
Win10输入法仅桌面怎么解决 Win10输入法仅在桌面显示的解决方法
2023-12-13 08:47:41
![](https://img.aspxhome.com/file/2023/3/51413_0s.jpg)