Sub CopierCouleurs()
Dim P As Range, ncol%, i&, j&, k%, x As Variant
Set P = ActiveSheet.UsedRange
ncol = P.Columns.Count
Application.ScreenUpdating = False
For i = 7 To P.Rows.Count
If P(i, 1) <> "" Then
P.Rows(i).Interior.ColorIndex = xlNone
j = i + 1
While P(j, 2) <> ""
x = Application.Match(P(j, 2), P.Columns(1), 0)
If IsNumeric(x) Then
x = P(x, 1).Interior.Color
For k = 3 To ncol
If P(j, k).Interior.ColorIndex <> xlNone Then
'P(j, k).Interior.Color = x 'pour modifier la couleur
With P(i, k).Interior
.Color = IIf(.ColorIndex = xlNone, x, 255)
End With
End If
Next k
End If
j = j + 1
Wend
i = j - 1
End If
Next i
End Sub