Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I copy comments into cells
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?!?!? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I copy comments into cells
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 SeanCrown wrote: 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?!?!? -- Dave Peterson |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I copy comments into cells
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 On Thu, 17 Nov 2005 08:38:22 -0800, SeanCrown wrote: 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?!?!? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to use macros to copy a range of cells which can exclude some cells which I didn't want to be copied? | Excel Worksheet Functions | |||
copy & paste spreadsheet cells from excel to outlook to excel | Excel Discussion (Misc queries) | |||
How do I copy a LARGE selection of cells from Excel to powerpoint? | Excel Discussion (Misc queries) | |||
How to copy block of cells and keep grouping? | Excel Discussion (Misc queries) | |||
reminder notifications in a column | Excel Discussion (Misc queries) |