Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [Choix]) Is Nothing Then Exit Sub
Dim c As Range, n&, i&, j&
Application.ScreenUpdating = False
Set c = [DebTab1] 'en-tête du 1er tableau
c(2, 0).Resize(Rows.Count - c.Row, 2).Delete xlUp 'RAZ
If [Choix] = "" Then Exit Sub
n = Application.Match([Choix], [Projet], 0) 'plage nommée "Projet"
With Feuil2 'CodeName
For i = 2 To .Range("D" & .Rows.Count).End(xlUp).Row
If Int(Val(.Cells(i, 4))) = n And .Cells(i, 5) <> "" Then
j = j + 1
c(j + 1, 0).Resize(, 2) = .Cells(i, 4).Resize(, 2).Value
c(j + 1, 1).Interior.Color = IIf(j Mod 2, 15917529, 15921906)
End If
Next
End With
For i = 7 To 10
If j Then c(2).Resize(j).Borders(i).Weight = xlMedium
Next
End Sub