Count Comments : Cell Comments « Excel « VBA / Excel / Access / Word






Count Comments

 
Sub CountComments()
    CommentCount = 0
    For Each cell In ActiveSheet.UsedRange
        On Error Resume Next
        x = cell.Comment.Text
        If Err = 0 Then CommentCount = CommentCount + 1
    Next cell
    Debug.Print CommentCount
End Sub

 








Related examples in the same category

1.Get the comment text
2.Converts docstring column into comments on name column.
3.Tracking cell changes in a comment
4.Clean the comment
5.resize Comments
6.Toggle Comments