Option Explicit: Option Compare Text
'========================================================
'=== Mise en forme des tâches ===
'========================================================
Private Sub Worksheet_Change(ByVal Target As Range)
Dim nlm&, dlg&, lig&, vx$
With Target
If .CountLarge > 1 Then Exit Sub
nlm = Rows.Count: dlg = Cells(nlm, 2).End(3).Row - 3: If dlg = 12 Then Exit Sub
If Intersect(Target, Range("E13:X" & dlg)) Is Nothing Then Exit Sub
ActiveSheet.Protect UserInterfaceOnly:=True 'protection interface
Application.ScreenUpdating = 0: .Interior.ColorIndex = -4142
vx = .Value: If vx = "" Then Exit Sub
dlg = Cells(nlm, 26).End(3).Row
For lig = 15 To dlg
If vx = Cells(lig, 26) Then _
.Interior.ColorIndex = Cells(lig, 26).Interior.ColorIndex
Next lig
End With
End Sub