Extract Comments In Excel with VBA

get comments from cell

There is currently no built-in function in excel which can allow us to extract the comment/notes of the cells into a cell. However, with the help of this User-Define Function (UDF) VBA code we can easily extract comments into the cell.

You can use the code in Excel for mac & windows

  1. Copy the below VBA Code by clicking on the copy box
  2. Open Microsoft Visual Basic for Applications window Developer Ribbon Tab > Visual Basic (Shortcut keys as follows for mac & windows)
    1. mac users fn + ⌥ [option] + F11
    2. windows users Alt + F11
  3. From the menu bar select Insert > Module and insert new Modules
  4. Paste the code into the module.

Note: It is always good to take a back-up copy of your original before running the code on the original file.

Function getComment(xCell As Range) As String
  'Make It Easy by ExcelExciting.com
	On Error Resume Next
	getComment = xCell.Comment.Text
  
End Function

Was the information helpful in this blog?

  • If yes, hit that share button and show the excitement to the world.
  • Subscribe to our free posts.

Join 2,923 other subscribers

If no, please let us know what to improve.

Having trouble with any Office Apps. Feel free to ask and answer queries at our forums section.


0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x