Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export MS Excel Comments from cells 1

Status
Not open for further replies.
Jun 11, 2002
30
US
We have a file created in Excel 2003 and now edited in 2007 in which the creators put all text in Comments attached to each cell and NOT in the cell itself as text. How, oh, how, can I export these comments? (2500 rows of data's worth >sigh<)

I have tried writing a macro to copy them out and paste in a new cell, but the macro copies only the 1st-copied text (from the macro's creation) and not the new one from the new cell.

Thank you for your help.
 


Hi,m
Code:
Sub CommentsToCells()
    Dim cm As Comment
    
    With Sheet1
        For Each cm In .Comments
            cm.Shape.TopLeftCell.Value = cm.Text
        Next
    End With
End Sub

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
This is awesome. It offsets by one cell, but I'll adjust it.

Thanks for sharing your massive expertise!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top