I am new to VBA..I am writing a macro for some file comparison..My requirement is if a string has red color font,that string should be ignored for iteration and code should
Say we have cells A1 thru A4 like:
Then this code will find the non-red characters:
Sub ColorTest()
Dim I As Long, J As Long
For I = 1 To 4
For J = 1 To Len(Cells(I, 1).Value)
If Cells(I, 1).Characters(Start:=J, Length:=1).Font.Color <> vbRed Then
MsgBox "non-red found at cell A" & I & " position " & J
End If
Next J
Next I
End Sub