Originally Posted by
mikerickson
You could use this UDF.
If you put =SetComment(A1, B1) in a cell, then the comment in B1 will show the value of cell A1.
[VBA]Function SetComment(commentString As String, Optional cellOfComment As Range) As Boolean
Dim Flag As Boolean
On Error GoTo Halt
If cellOfComment Is Nothing Then Set cellOfComment = Application.Caller
If commentString = vbNullString Then commentString = " "
Set cellOfComment = cellOfComment.Cells(1, 1)
cellOfComment.Comment.Text commentString
SetComment = True
Exit Function
Halt:
If Err = 91 And Not Flag Then
cellOfComment.AddComment
Flag = True
Resume
End If
End Function[/VBA]