Try:
Sub winmaxservicesz()
Dim ws As Worksheet, ws1 As Worksheet, i As Long, x As Range, y As String, z As Long
Set ws = Sheets("MANUAL CHECKING")
Set ws1 = Sheets("ACCT.DETAILS")
y = ""
With ws
For i = 2 To .Range("F" & Rows.Count).End(3).row
For Each x In ws1.Range("C2:C" & ws1.Range("C" & Rows.Count).End(3).row)
If x.Value Like "*" & .Cells(i, "F") & "*" Then
y = y & x.Offset(, 1) & "^"
.Cells(i, "I") = y
End If
y = y
Next x
y = ""
If .Cells(i, "I") = "" Then
.Cells(i, "I") = "No Sr."
GoTo zz
End If
If .Cells(i, "I") <> "" Then
.Cells(i, "I") = Left(.Cells(i, "I"), Len(.Cells(i, "I")) - 1)
For z = 3 To 5
If Left(Cells(i, "I"), z) = Right(Cells(i, "I"), z) Then Cells(i, "I") = Left(Cells(i, "I"), z)
Next z
End If
zz:
.Cells(i, "I").HorizontalAlignment = xlLeft
Next i
End With
Bookmarks