Sub FindTextInComments()
Dim strTextToFind As String
Dim cmt As Comment
Dim blnFound As Boolean
On Error GoTo Bail
strTextToFind = InputBox("Find what?", "Search for text in comments")
If strTextToFind = "" Then Exit Sub 'User pressed cancel
'Now search each comment on the active sheet for the text
'specified for the user.
For Each cmt In ActiveSheet.Comments
If InStr(1, cmt.Text, strTextToFind, vbTextCompare) > 0 Then
blnFound = True
cmt.Parent.Select
cmt.Visible = True
MsgBox "Cell : " & cmt.Parent.Address & vbCrLf & _
"Value : " & cmt.Text, vbInformation, Chr(34) & strTextToFind & Chr(34) & " found"
cmt.Visible = False
End If
Next cmt
If blnFound = False Then MsgBox "The search text was not found on this sheet.", vbInformation, "No match found"
Bail:
If Err.Number <> 0 Then MsgBox Err.Description, vbExclamation, "An error occurred"
End Sub