excel用自定义函数获取单元格注释
时间:2023-03-11 10:50:58
我们可以用一个自定义函数来提取单元格注释。方法如下:
1.按Alt+F11,打开VBA编辑器。
2.单击菜单“插入→模块”,在右边的代码窗口中输入代码:
Function GetCommentText(rCommentCell As Range)
Dim strGotIt As String
On Error Resume Next
strGotIt = WorksheetFunction.Clean(rCommentCell.Comment.Text)
GetCommentText = strGotIt
On Error GoTo 0
End Function
3.关闭VBA编辑器。在单元格中输入公式:
=GetCommentText(B4)
将在当前单元格中返回B4单元格中的注释。
标签:函数,单元格,注释,自定义,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
在Word2010文档中新建模板
2023-12-13 05:43:48
![](https://img.aspxhome.com/file/2023/1/21591_0s.jpg)
Win10电脑蓝屏代码0X000000a5怎么办?电脑蓝屏代码0X000000a5的解决方法
2022-10-10 05:47:20
![](https://img.aspxhome.com/file/2023/26/a222573_0s.png)
Windows10系统怎么一键重装系统?石大师一键重装系统步骤
2023-04-28 08:47:20
![](https://img.aspxhome.com/file/2023/1/a275358_0s.jpg)
苹果 WWDC21 官方视频泄露“M1X MacBook Pro”
2022-11-16 08:20:23
![](https://img.aspxhome.com/file/2023/6/a206266_0s.jpeg)
PPT怎么制作锯齿外光的饼图图表?PPT制作锯齿外光的饼图图表教程
2022-03-21 19:33:51
![](https://img.aspxhome.com/file/2023/10/a352772_0s.jpg)
一群高手折腾了一个晚上都搞不定的库存表,结果居然一个简单的SUMIFS函数就搞定...
2022-12-14 16:03:06
win10电脑锁屏快捷键是什么_win10电脑锁屏的快捷键
2022-09-13 05:01:00
![](https://img.aspxhome.com/file/2023/2/a286055_0s.jpg)
Excel如何转换其他格式?Excel转换成PDF格式教程
2022-02-27 13:09:11
![](https://img.aspxhome.com/file/2023/8/a143478_0s.png)
win10搜索不到工作组计算机怎么办
2022-05-05 02:49:01
![](https://img.aspxhome.com/file/2023/3/a301513_0s.png)
Word2003无法输入数字2
2022-01-16 22:40:52
怎样用u盘装xp系统教程
2023-01-23 05:44:55
![](https://img.aspxhome.com/file/2023/4/a308794_0s.png)
Mac配上“刘海屏”?苹果新专利显示Mac将支持Face ID
2023-12-06 03:09:01
![](https://img.aspxhome.com/file/2023/5/a210405_0s.jpeg)
excel筛选不了是什么原因?excel筛选不了的原因介绍
2023-07-21 18:44:05
![](https://img.aspxhome.com/file/2023/0/39580_0s.jpg)
excel 批注加图片 excel 批注怎么加图片
2022-08-29 17:59:10
6个支持M1的HDR图像处理工具合集
2022-11-13 14:27:05
![](https://img.aspxhome.com/file/2023/4/a204804_0s.jpeg)
vivo X27怎么双开微信?vivo X27双开微信的方法
2022-08-07 21:04:52
![](https://img.aspxhome.com/file/2023/6/a325031_0s.jpg)
PPT中怎么制作一个造型独特的图表?
2022-05-24 07:58:32
![](https://img.aspxhome.com/file/2023/10/a346691_0s.jpg)
Win8电脑怎么调鼠标灵敏度?
2022-07-24 21:57:17
![](https://img.aspxhome.com/file/2023/2/a288228_0s.jpg)
win10怎么设置ip地址?win10配置静态IP地址
2022-07-25 12:23:36
![](https://img.aspxhome.com/file/2023/29/a253411_0s.jpg)
Windows Update XP SP3官方下载地址
2022-12-13 02:14:13