Private Sub Worksheet_Change(ByVal Target As Range)
Dim cel As Range, i As long
Application.EnableEvents = False
With ActiveSheet
For i = 2 To Range("b65536").End(xlUp).Row
If .Cells(i, 2).Value = .Cells(i, 5).Value Then
With .Cells(i, 2).Borders(xlDiagonalUp) ' Oubien Borders(xlDiagonalDown)
.Weight = xlThin
.ColorIndex = 3
End With
End If
If .Cells(i, 2).Value = .Cells(i, 5).Value And .Cells(i, 3).Value = .Cells(i, 5).Value Then
With .Cells(i, 3).Borders(xlDiagonalUp)
.Weight = xlThin
.ColorIndex = 3
End With
End If
Next i
End With
On Error Resume Next
Set cel = Range("b2:c10000")
For Each cel In Selection
cel.Borders.LineStyle = xlLineStyleNone
Next cel
Application.EnableEvents = True
End Sub