I have the following code that I got from another thread that highlights a row based on a cells contents in a column. I need to test for military rank abbreviations such as TSgt, Col, Lt, 2Lt, Capt, Maj, SMsgt, MSgt, and if found change the text in the row to white. Can somebody help me alter this code to do that?
Last = Cells(Rows.Count, "A").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "C").Value) Like "*[Mm]atch*" Then
Cells(i, "A").EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
Next i
Last = Cells(Rows.Count, "A").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "C").Value) Like "*[Mm]atch*" Then
Cells(i, "A").EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
Next i