I could use some help with this routine. The intent is this: If a cell in column 'E' conains the substring "See CPAAI team" then change the fill color for the row from columns A through E. I don't want to use conditional highlighting because the search string can be a substring of the contents of the cell.
Code:
Dim LastRow As Long, RowCnt As Long
Dim ArrCnt as Integer, ForCnt As Integer
Dim rng As Range
Application.ScreenUpdating = False
LastRow = Range("A65536").End(xlUp).Row
For RowCnt = 1 to LastRow
Set rng = Range("E" & RowCnt).MergeArea
'Sometimes the values in "E" have trailing spaces, remove them
rng.Value = Trim(rng.Value)
If rng.Cells(1,1) [code for contains subsring] "See CPAAI team" Then
[Code to change fill color to light yellow for the row (from columns A through E) here ]
End If
Next RowCnt
set rng = Nothing
Application.ScreenUpdating = True
End Sub