Copy contents of comments to new cell

Closed
smd - May 24, 2009 at 03:33 AM
mubashir aziz Posts 190 Registration date Sunday April 12, 2009 Status Member Last seen February 16, 2010 - May 25, 2009 at 12:38 AM
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 response

mubashir aziz Posts 190 Registration date Sunday April 12, 2009 Status Member Last seen February 16, 2010 165
May 25, 2009 at 12:38 AM
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