跳到主要內容

如何在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。 按 Enter 鍵。 並選擇單元格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將註釋轉換為單元格內容

Excel的Kutools :具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。立即獲取 .

轉換評論和單元格 of Excel的Kutools 是一個方便實用的工具,可以幫助您解決有關註釋的許多問題。

安裝後 Excel的Kutools,請執行以下操作:

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選項卡為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