Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim x As Range, xcell, ligne&, coul
Set x = Intersect(Target, Columns("a:c"))
If x Is Nothing Then Exit Sub
Set x = Intersect(x.EntireRow, Rows("4:" & Rows.Count), Columns("a"))
If x Is Nothing Then Exit Sub
With Sheets("Feuil2")
For Each xcell In x.Cells
If xcell <> "" Then
ligne = Application.IfError(Application.Match(xcell, .Columns("a:a"), 0), 0)
If xcell.DisplayFormat.Interior.ColorIndex = xlColorIndexNone Then
If ligne = 0 Then .Cells(Rows.Count, "a").End(xlUp).Offset(1).Resize(, 3) = xcell.Resize(, 3).Value
Else
If ligne > 0 Then .Cells(ligne, "a").Resize(, 3).Delete shift:=xlShiftUp
End If
End If
Next xcell
End With
End Sub