This UDF will return true if the cell provide for the parameter has a comment or false if not.
You could put this in your workbook code modules or your personal.xls if you want it available to all open workbooks.
It is volatile, so will re-calc when the workbook does, but if it is the only function and inserting a comment does not force a re-calc, you may wish to put a =Now() function somewhere to force a calc?
Public Function CellHasComment(TestCell As Range) As Boolean
Dim cmt As Comment
Application.Volatile True
Set cmt = TestCell.Comment
If Not cmt Is Nothing Then
CellHasComment = True
Else
CellHasComment = False
End If
End Function
Regards
Nick Hodge
Microsoft MVP, Excel
Southampton, UK