1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
Sub Test()
Dim A As Variant
Dim Matrice() As Variant
Dim I As Integer, LongueurChaine As Integer
A = Split(ActiveCell, Chr(10))
LongueurChaine = 1
For I = LBound(A) To UBound(A)
ReDim Preserve Matrice(2, I)
Matrice(0, I) = A(I)
Matrice(1, I) = ActiveCell.Characters(LongueurChaine, Len(A(I))).Font.Color
Matrice(2, I) = ActiveCell.Characters(LongueurChaine, Len(A(I))).Font.Strikethrough
LongueurChaine = LongueurChaine + Len(A(I)) + 1
Next I
For I = LBound(Matrice, 2) To UBound(Matrice, 2)
With ActiveCell.Offset(0, 2 + I)
.Value = Matrice(0, I)
.Font.Color = Matrice(1, I)
.Font.Strikethrough = Matrice(2, I)
End With
Next I
End Sub |
Partager