Sub coloreSubtype()
fin = Range("J65536").End(xlUp).Row 'dernière ligne du tableau
For ligne = 2 To fin
SubType = Range("J" & ligne)
'séparation des différents subtype: séparés d'un *
ST = Split(SubType, "*", -1)
'nombre d'éléments
'MsgBox UBound(ST)
'pour chaque soustype, on les recherche dans les zones 2014 et 2015
For i = 0 To UBound(ST)
debut = InStr(1, SubType, ST(i))
longueur = Len(ST(i))
'recherche en 2014 2015
Set c = Range("K" & ligne & ":N" & ligne).Find(ST(i), LookIn:=xlValues)
If Not c Is Nothing Then
'MsgBox c.Address
If c.Column = 11 Or c.Column = 12 Then
'MsgBox ST(i) & " en Orange"
'coloration en orange dans la cellule J
With Cells(ligne, 10).Characters(Start:=debut, Length:=longueur).Font
.Color = -16727809
End With
Else:
'MsgBox ST(i) & " en Vert"
'coloration en Vert dans la cellule J
With Cells(ligne, 10).Characters(Start:=debut, Length:=longueur).Font
.Color = -11480942
End With
End If
Else:
'MsgBox ST(i) & " en Rouge"
'coloration en rouge dans la cellule J
With Cells(ligne, 10).Characters(Start:=debut, Length:=longueur).Font
.Color = -16776961
End With
End If
Next i
Next ligne
End Sub