Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SeanCrown
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use macros to copy a range of cells which can exclude some cells which I didn't want to be copied? excelnovice Excel Worksheet Functions 2 September 25th 05 12:38 AM
copy & paste spreadsheet cells from excel to outlook to excel mismarple Excel Discussion (Misc queries) 1 September 20th 05 11:16 PM
How do I copy a LARGE selection of cells from Excel to powerpoint? Deadly Excel Discussion (Misc queries) 2 August 15th 05 03:21 PM
How to copy block of cells and keep grouping? dstock Excel Discussion (Misc queries) 2 July 6th 05 08:42 PM
reminder notifications in a column L Mieth Excel Discussion (Misc queries) 6 June 10th 05 11:00 AM


All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"