跳到主要内容

如何在Excel中将注释转换为单元格内容?

假设我在工作表中有一个充满注释的范围单元格,现在,我想将所有注释都转换为单元格内容,以便可以整齐而完整地打印它们。 有什么好的方法可以解决这个任务?

使用用户定义的功能将注释转换为单元格内容

使用VBA代码将注释转换为单元格内容

使用 Kutools for Excel 将注释转换为单元格内容


箭头蓝色右气泡 使用用户定义的功能将注释转换为单元格内容

通过使用此方法,您需要首先创建一个定义的函数,然后应用定义的公式将注释转换为单元格内容。 您可以按照以下步骤完成它:

1点击 开发商 > Visual Basic中,一个新的 适用于应用程序的Microsoft Visual Basic 将显示一个窗口,单击 插页 > 模块,然后将以下函数输入到模块中:

函数GetComments(pRng作为范围)作为字符串'Updateby20140509如果pRng.Comment不存在,则GetComments = pRng.Comment.Text如果结束,则结束函数

2.媒体 按Ctrl + S 保存功能。

3然后输入以下公式“= GetComments(A1)在任何空白单元格中,在这种情况下,我将使用单元格E1。 看截图:

文档注释到单元格1

4。 按 输入 键。 并选择单元格E1,然后将填充手柄拖到要包含此公式的单元格范围内。 并且所有注释都转换为单元格内容。 看截图:

文档注释到单元格2


箭头蓝色右气泡 使用VBA代码将注释转换为单元格内容

如果您知道VBA代码,则以下简短代码也可以帮助您将注释转换为单元格内容。

1。 选择要转换为单元格内容的范围;

2。 点击 开发商 > Visual Basic中,一个新的 适用于应用程序的Microsoft Visual Basic 将显示一个窗口,单击 插页 > 模块,然后将以下代码输入到模块中:

Sub CommentToCell()
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
    Rng.Value = Rng.NoteText
Next
End Sub

3。 然后点击  文档乘法计算 3 按钮运行代码。 并选择要转换的范围,然后单击 OK,并且所有选定的注释都已转换为其相关单元格中的单元格内容。


文档注释到单元格3 -2 文档注释到单元格4

备注:如果您不想评论,则可以将其删除。


箭头蓝色右气泡 使用 Kutools for Excel 将注释转换为单元格内容

Kutools for Excel :具有300多个方便的Excel加载项,可以在30天内免费试用,没有任何限制。立即获取 .

转换评论和单元格 of Kutools for Excel 是一个方便实用的工具,可以帮助您解决有关注释的许多问题。

安装后 Kutools for Excel,请执行以下操作:

1。 选择您要将注释导入单元格中的范围。

2。 点击 库工具 > 更多 > 转换评论和单元格,请参见屏幕截图:

文档注释到单元格 5

3。 在 转换评论和单元格 对话框中选择 将评论转换为单元格内容。 看截图:

文档注释到单元格 6

4。 然后点击 OK。 现在,所有选定的注释都将转换为其原始范围内的单元格内容。

有关更多详细信息 转换评论和单元格,请访问: 转换注释和单元格功能描述.


相关文章:

最佳办公生产力工具

🤖 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 (24)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, The first function in a module does the job only once: when I write or drag the formula down. If I go back to change any of the comment it does not update the destination cell with the new comment. For example let's say I have a comment in A1, then when I place the formula in cell B1, it will show me the A1's comment only the first time. If I go back and change the A1 comment, the cell B1 does not get updated. I tried "Calculate Now" or F9 and nothing happens. I saved the file and opened again and nothing, cell B1 stays with the old comment. It is like the function is dead. Now, if I enter or change anything in the cell A1 itself (not the comment), like adding an space in the end, it will immediately update the comment. I'm using Office 2019 Pro.
This comment was minimized by the moderator on the site
thanks very musch
This comment was minimized by the moderator on the site
great site
This comment was minimized by the moderator on the site
is there a way to do this without the title of a comment or the non bold writing?
This comment was minimized by the moderator on the site
Great tip, thanks for sharing!
This comment was minimized by the moderator on the site
Perfect! Thank You
This comment was minimized by the moderator on the site
You are a star!!! thanks
This comment was minimized by the moderator on the site
It does not automatically update when I change the comment. How do I change this? Thanks
This comment was minimized by the moderator on the site
Same problem here. Changing the comment does not trigger the calculations. Forcing the calculation (F9) does not work. Saving and load the file does not work. However, changing a cell content will trigger the calculations.
This comment was minimized by the moderator on the site
You are my HERO!!!!!!!!!!!!!!!!!!!!!! Thank You Thank You Thank You
This comment was minimized by the moderator on the site
Hi. I tried this code and it worked right. But I have a little problem: can I use this code combined with VLOOKUP? I tried but I didn't get anything. If you can help me, I'll be thankful. I'm brazilian. If I wrote something wrong, I apologise. Thanks!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations