EXCEL: Export cell comments

GreGorGy

BULLSFAN
Joined
Jan 18, 2005
Messages
15,290
Reaction score
1,527
Location
Benoniebfkweesnie
Can I export the comments for cells in Excel? I have a spreadsheet with THOUSANDS (ok, about 100) of comments and I would hate to individually copy-paste these.
 
You can try the following VBA Code, which will put the comments into a cell next to where the comment appeared.

**Please Make A Backup Or Use A Copy Of The Excel File Before Continuing**
- Open the relevant workbook in Excel.
- Right click the worksheet which contains the comments
- Select [View Code]
- Insert the VBA code into the [General] code window
- Press the [Run] button (looks like a play button) or press the [F5] button
- Go back to the relevant workbook and the comments are now displayed in the cell next to where the comment appeared.
**Please Make A Backup Or Use A Copy Of The Excel File Before Continuing**


Sub ShowComments()
Dim aComment As Comment, aRange As Range

For Each aComment In Worksheets("Sheet1").Comments
Set aRange = aComment.Parent
aRange.Offset(columnoffset:=1).Value = aComment.Text
Next

End Sub
 
Thanks Zara - went ahead and used this then (results did not come as expected) found a similar one to copy the comments to Word.
 
Top
Sign up to the MyBroadband newsletter
X