A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
There is no built-in function for this. You could copy the following user-defined function into a module in the Visual Basic Editor:
Function HasComment(rng As Range) As Boolean
If rng.CountLarge = 1 Then
HasComment = Not (rng.Comment Is Nothing)
End If
End Function
Use like this:
=HasComment(A1)
You can combine this with other functions in a formula, of course.
You'll have to save the workbook as a macro-enabled workbook (*.xlsm) and allow macros when you open it.