How do I copy comments into cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I received a spreadsheet from a customer with a lot of cell comments. It is
difficult to read and see the comments. Is there a way to highlight the
column and copy the comments into cells in the next column?!?!? Not as
comments, but as cell data?!?!?
 
Saved from a previous post:

You can retrieve the text from a comment with a userdefined function like:

Option Explicit
Function GetComment(FCell As Range) As Variant
Application.Volatile

Set FCell = FCell(1)

If FCell.Comment Is Nothing Then
GetComment = ""
Else
GetComment = FCell.Comment.Text
End If

End Function

Then you can use it like any other function:

=getcomment(a1)

But be aware that the function won't evaluate when you just change the comment.
It'll be correct when excel recalculates. (Hit F9 to force a recalc.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Sean

Macro to do so.

Sub ListComms()
Dim oCell As Range
For Each oCell In Selection
If Not oCell.Comment Is Nothing Then
oCell.Offset(0, 1).Value _
= oCell.Comment.Text
oCell.EntireRow.AutoFit
End If
Next oCell
End Sub

Why are the comments hard to read? Volume of text is too great to see all at
once?

Maybe re-sizing the comments to fit all the text would be easier.

Public Sub Comment_Size()
Dim cmt As Comment
Dim cmts As Comments
Set cmts = ActiveSheet.Comments
For Each cmt In cmts
cmt.Shape.TextFrame.AutoSize = True
Next
End Sub


Gord Dibben Excel MVP
 

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

Similar Threads

Excel Import Comments 3
Excel Linking (I think) 17
Extract Cell Comments and Paste as text in a cell 3
copying comments box 1
linking cell comments in excel 2003 1
Copying a Picture From Cell Comment 0
Comment box 7
Cell Comments 3

Back
Top