Move Comment into cell as Text

F

Frances

How do I move comments into cells as text?
or use vlookup to pull comment to another sheet?
 
G

Gary''s Student

Select some cells and run this macro:

Sub CommentMover()
Dim r As Range
For Each r In Selection
On Error Resume Next
Set C = r.Comment
If Err.Number = 0 Then
r.Offset(0, 1).Value = r.Comment.Text
End If
On Error GoTo 0
Next
End Sub

If one of the selected cells contains a comment, the text will be copied
into the cell immediately to the right.
 
F

Frances

Worked Wonderfully.
--
Just Computing


Gary''s Student said:
Select some cells and run this macro:

Sub CommentMover()
Dim r As Range
For Each r In Selection
On Error Resume Next
Set C = r.Comment
If Err.Number = 0 Then
r.Offset(0, 1).Value = r.Comment.Text
End If
On Error GoTo 0
Next
End Sub

If one of the selected cells contains a comment, the text will be copied
into the cell immediately to the right.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top