Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Fin: If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, [G3:H3]) Is Nothing Then
Application.ScreenUpdating = False: Application.EnableEvents = False
[C7:I35].ClearContents: T = [tblDonnées]
For i = 1 To UBound(T)
If IsEmpty(T(i, 1)) Then Exit For
If T(i, 1) >= [SemaineDu] And T(i, 1) <= [SemaineDu] + 6 And T(i, 4) = [AfficherNom] Then ' Si date et nom concernés.
C = T(i, 1) - [SemaineDu] + 3 ' Calcul colonne
For L = 7 To 35 ' Cherche lignes concernées
If Cells(L, "B") >= T(i, 2) And Cells(L, "B") <= T(i, 3) Then Cells(L, C) = T(i, 5) ' Ecrit tache
Next L
End If
Next i
End If
Fin:
Application.ScreenUpdating = True: Application.EnableEvents = True
End Sub