Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Patrick from RAS
 
Posts: n/a
Default How do I copy a comment to become the information in a cell.

I am trying to copy comments in a spreadsheet into cells on the same line so
that they become the cell not a comment attached to a cell.
  #2   Report Post  
Rowan
 
Posts: n/a
Default

The macro below inserts the text from a comment in the activecell into the
first blank cell in the row. The comment is then deleted so save your work
before testing this:

Sub cmt()
Dim eCol As Integer
Dim cmtText As String
Dim cmt As Comment
Set cmt = ActiveCell.Comment
If Not cmt Is Nothing Then
With ActiveCell
eCol = Cells(.Row, Columns.Count).End(xlToLeft).Column + 1
cmtText = Application.WorksheetFunction.Substitute _
(cmt.Text, Chr(10), " ")
Cells(.Row, eCol).Value = cmtText
Cells(.Row, eCol).WrapText = False
cmt.Delete
End With
End If
End Sub

Hope this helps
Rowan

"Patrick from RAS" wrote:

I am trying to copy comments in a spreadsheet into cells on the same line so
that they become the cell not a comment attached to a cell.

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
What is this yellow box? ..Not a comment MistWolf Excel Discussion (Misc queries) 2 May 29th 05 02:09 AM
Copying information from multiple worksheets into one ShahAFFS Excel Discussion (Misc queries) 2 May 25th 05 03:21 PM
Adding default comment text dshigley Excel Discussion (Misc queries) 1 April 8th 05 05:26 PM
Copy and paste Internet information into Excel 2003 Michael Excel Discussion (Misc queries) 0 February 10th 05 09:51 PM
comment indicators should feature lock or pw protect limiting acc. summer_rose Excel Worksheet Functions 1 December 3rd 04 07:02 AM


All times are GMT +1. The time now is 08:13 AM.

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"