View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Move comment into cell as text

This macro will put the comments in the same cell it is attached to and then
delete the comments...

Sub MoveCommentsToCells()
Const WorksheetName As String = "Sheet2"
Const CommentColumn As Long = 4
Dim C As Comment
For Each C In Worksheets(WorksheetName).Comments
With C.Parent
If .Column = CommentColumn Then
If UBound(Split(.Comment.Text, vbLf)) 0 Then .WrapText = True
.Value = C.Text
C.Delete
End If
End With
Next
End Sub

There are two things you have to change in the above so that they apply to
your worksheet (and not my test worksheet). Change the Const assignment for
the WorksheetName to the name you have on the tab for the worksheet with
your comments on them. Also change the Const assignment for the
CommentColumn from the test column number of 4 that I used in my test to
whatever the column number is with your comment in it. If you are unfamiliar
with macros, simply right click the worksheet tab your comments are on,
select View Code from the popup menu that appears and copy/paste the above
macro into the code window that appeared. You can then make the two changes
I just told you about. Finally, place the cursor anywhere inside the code
you just pasted and press F5. Go back to your worksheet... the comments
should now be in the cells (by the way, if your comments occupied more than
one line, then text wrapping for the cell was turned on).

--
Rick (MVP - Excel)


"PhooPhan" wrote in message
...
I have a spreadsheet that someone else created and they added comments to a
bunch of cells in one column. I want to convert the comments to text in
either the same cell or one to the right. (the comments are in blank
cells)
It's driving me crazy to have to either hover over or click on the comment
mark every time I want to see the notes. I also want to import the
spreadsheet into a Business Manager Database. When I tried to import it
the
way it is now the comments did not import.