I found a few sites with Google on how to pull comments from existing cells and put them as text in another cell, using the following formula =getComment() with this slightly modified VBA:
Function getComment(rincell As Range)
Dim cmnt As String
' aceepts a cell as input and returns its comments (if any) back as a string
On Error Resume Next
cmnt = WorksheetFunction.Clean(rincell.Comment.Text)
getComment = Right(cmnt, Len(cmnt) - InStr(1, cmnt, ":", vbTextCompare))
On Error GoTo 0
End Function
I am able to accomplish mostly what is intended, however any formating as in Bold, Italics, paragraphs etc. is lost when it puts the text into the cell with the formula. Is there a way to fix this to pull the comment exactly as it is?
Bookmarks