List all comments from sheet on separate sheet in Excel



List all comments from a sheet on a separate sheet in Excel. Copy all comments on a worksheet to separate sheet.
For more help visit my website or email me at easyexcelanswers@gmail.com.

Contact me regarding customizing this template for your needs.

Excel one-on-one on-line training available. Email me to arrange.

I am able to provide online help on your computer at a reasonable rate.

Check out my next one-hour Excel Webinar

I use a Blue condensor Microphone to record my videos, here is the link

Check out Crowdcast for creating your webinars

If you need to buy Office 2019 follow

I use Tube Buddy to help promote my videos
Check them out

Follow me on Facebook

TWEET THIS VIDEO

Follow me on twitter
easyexcelanswers

IG @barbhendersonconsulting

You can help and generate a translation to you own language

*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.

Follow me on Facebook

Sub listComments()
Dim liComment As Comment
Dim i As Integer
Dim ws As Worksheet
Dim ComSh As Worksheet
Set ComSh = ActiveSheet
If ActiveSheet.Comments.Count = 0 Then Exit Sub

For Each ws In Worksheets
If ws.Name = “Comments” Then i = 1
Next ws

If i = 0 Then
Set ws = Worksheets.Add(After:=ActiveSheet)
ws.Name = “Comments”
Else: Set ws = Worksheets(“Comments”)
End If

For Each liComment In ComSh.Comments
ws.Range(“A1”).Value = “Comment In”
ws.Range(“B1”).Value = “Comment By”
ws.Range(“C1”).Value = “Comment”
With ws.Range(“A1:C1”)
.Font.Bold = True
.Interior.Color = RGB(189, 215, 238)
.Columns.ColumnWidth = 20
End With
If ws.Range(“A2”) = “” Then
ws.Range(“A2”).Value = liComment.Parent.Address
ws.Range(“B2”).Value = Left(liComment.Text, InStr(1, liComment.Text, “:”) – 1)
ws.Range(“C2”).Value = Right(liComment.Text, Len(liComment.Text) – InStr(1, liComment.Text, “:”))
Else
ws.Range(“A1”).End(xlDown).Offset(1, 0) = liComment.Parent.Address
ws.Range(“B1”).End(xlDown).Offset(1, 0) = Left(liComment.Text, InStr(1, liComment.Text, “:”) – 1)
ws.Range(“C1”).End(xlDown).Offset(1, 0) = Right(liComment.Text, Len(liComment.Text) – InStr(1, liComment.Text, “:”))
End If
Next liComment
End Sub

Watch more new videos about Excel Office | Synthesized by Mindovermetal English

Rate this post

Bài viết liên quan

Theo dõi
Thông báo của
guest
5 Comments
Cũ nhất
Mới nhất Được bỏ phiếu nhiều nhất
Phản hồi nội tuyến
Xem tất cả bình luận
米亞

Thank you for sharing it!

Q Q

I have a data file I use on a server that is updated daily
What I am trying to do in a seperate workbook is after I type in an order and the vlookup pulls that info up for me to view is to also grab a comment if there is one from a particular cell.
The path to server is right but how do i grab the comment to view it on the seperate book?
E.g.
If i type say 120 and hit enter the vlookup finds it and displays it but if there is a comment then how do i also see that?
I was thinking of two ways.
1. Somehow have vlookup not only show the info but if there is a comment added to show it as well
2. Somehow show comment in seperate cell after doing search.
2nd way much easier I think.
Except I cannot get either way to work.
Any ideas would be great

Prasanna Laxmi

Hi.Can you please help me witha vba code to extract comments but not notes

bahaa emam

i found error on this line
ws.Range("B2").Value = Left(liComment.Text, InStr(1, liComment.Text, ":") – 1)

how to solve it

Mohamed Chakroun

Useful Code Thanks