Sub test()
Dim laCellule As Range, tabLignes() As Long, tmpStr() As String, i As Long, j As Long, tmp As Long
Set laCellule = Range("A1")
'récupérer dans un tableau la position du premier caractère de chaque ligne ainsi que le nombre de caractères de la ligne
tmpStr = Split(laCellule.Text, vbLf)
ReDim tabLignes(1 To UBound(tmpStr) + 1, 1 To 2)
For i = LBound(tmpStr) To UBound(tmpStr)
tmp = 0
For j = LBound(tmpStr) To i - 1
tmp = tmp + Len(tmpStr(j))
Next j
tabLignes(i + 1, 1) = tmp + 1 + i
tabLignes(i + 1, 2) = Len(tmpStr(i))
Next i
'colorier la première ligne en rouge
laCellule.Characters(tabLignes(1, 1), tabLignes(1, 2)).Font.Color = RGB(255, 0, 0)
'colorier la deuxième ligne en vert
laCellule.Characters(tabLignes(2, 1), tabLignes(2, 2)).Font.Color = RGB(0, 255, 0)
'colorier la troisième ligne en bleu
laCellule.Characters(tabLignes(3, 1), tabLignes(3, 2)).Font.Color = RGB(0, 0, 255)
End Sub