Copy contents of comments to new cell

[Closed]
Report
-
Posts
190
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
-
Hello,
I've got a sheet with 30 columns of data with comments in various cells. i need to extract the comments from each row across the 30 columns and put the comments as remarks in a separate cell.

field1 field2 field3 field4 field5.... field30 remark_field
field1,3 & 4 has comments

the comments from those 3 fields shud be put in the remarks field and each comment separated by a /

1 reply

Posts
190
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
155
Can you tell me exactly the range of your cells and then in which column / rows you want to copy the data ????


Anyway i've a small macro which copies the comments data in same cells .... you can make copy of your working sheet and then after clearing the data from cells you can run this macro .....


Sub commentstextintocell()

' This will copy text from comments into Cells
' But its necessary to select all the cells which comments you want in cells
'

Dim cell As Range

On Error Resume Next

For Each cell In Intersect(Selection, ActiveSheet.UsedRange)
        
        If Trim(cell.Comment.Text) <> "" Then
        cell.Value = cell.Comment.Text
                     
         End If

Next cell


End Sub

3
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month