Private Sub Worksheet_Change(ByVal Target As Range)
Dim Nombre As Integer, Adresse As String, Plage As Range
With Target
If Intersect(Target, Range("B:C,G:H,L:M,Q:R,V:W")) Is Nothing Or .Text = "" Or .Count > 1 Then Exit Sub
Adresse = "B" & .Row - Weekday(Range("A" & .Row)) + 1 & ":F" & .Row - Weekday(Range("A" & .Row)) + 7
Set Plage = Intersect(Range(Adresse), Range("B:C,G:H,L:M,Q:R,V:W"))
Nombre = Evaluate("countif(" & Intersect(.EntireColumn, Plage).Address & ",""" & .Text & """)")
If Nombre > 1 Then
If Evaluate("countif(" & Plage.Address & ",""" & .Text & """)") - Nombre > 1 Then
MsgBox "Valeur en doublon !", vbCritical + vbOKOnly, "ATTENTION !"
.ClearContents
End If
Else
If Evaluate("countif(" & Plage.Address & ",""" & .Text & """)") > 1 Then
MsgBox "Valeur en doublon !", vbCritical + vbOKOnly, "ATTENTION !"
.ClearContents
End If
End If
End With
End Sub