This macro should work
Sub TestComments()
With ActiveSheet
Set LastCell = .Cells.SpecialCells(xlCellTypeLastCell)
Set UsedArea = Range("A1", LastCell)
For Each cell In UsedArea
If Not cell.Comment Is Nothing Then
Comment = cell.Comment.Text
'remove persons name
If InStr(Comment, ":") 0 Then
Comment = Mid(Comment, InStr(Comment, ":") + 1)
End If
If Len(Comment) < 10 Then
MsgBox (cell.Address & " : Comment has less than 10 characters")
End If
End If
Next cell
End With
End Sub
"cpf" wrote:
I am encoding 10 digit code on a comment box for most of my
worksheets. Question: how can I create a macro or any formula that
will identify comment boxes which has less than or more that 10 digit
codes? Hope you can help me. I badly need it to achieve accuracy of my
worsheet.
I can also be reached at YM, . I will keep my gtalk
activated in case u need further info. Thanks in advance