Sub Analyser3()
Application.ScreenUpdating = False
Range("A2:C18").Font.Bold = False
Range("A2:C18").Font.ColorIndex = xlAutomatic
Range("A2:C18").Interior.Color = RGB(255, 255, 255)
For Each xCell In Range("C2:C18")
If IsEmpty(xCell.Value) = True Then
xCell.Offset(0, -2).Interior.Color = RGB(255, 0, 0)
Else
xLesClass = Split(xCell.Value, ",")
For F = 0 To UBound(xLesClass)
xEquiv = Application.Match(Trim(xLesClass(F)), Sheets("Feuil2").Range("A2:A22"), 0)
If IsError(xEquiv) = False Then
xMot = Trim(xLesClass(F))
xPos = 1
Do While xPos > 0
xPos = InStr(xPos, xCell, xMot)
If xPos > 0 Then
With xCell.Characters(xPos, Len(xMot)).Font
.ColorIndex = 3 'ROUGE
.Bold = True
End With
xPos = xPos + Len(xMot)
End If
Loop
'MsgBox "Class trouvée" & Trim(xLesClass(F))
xCell.Offset(0, -2).Interior.Color = RGB(255, 128, 128)
End If
Next F
End If
Next xCell
Application.ScreenUpdating = True
End Sub