Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Fin
Application.EnableEvents = False
If Not Intersect(Target, [B5]) Is Nothing Then
Ligne = Application.Match([B5], [H1:H99], 0)
[E5] = Cells(Ligne, "I")
ElseIf Not Intersect(Target, [E5]) Is Nothing Then
Ligne = Application.Match([E5], [I1:I99], 0)
[B5] = Cells(Ligne, "H")
End If
Fin:
Application.EnableEvents = True
End Sub
Sub Worksheet_Change2(ByVal Target As Range)
On Error GoTo Fin
Application.EnableEvents = False
If Not Intersect(Target, [B5]) Is Nothing Then
Ligne = Application.Match([B5], [K1:K11], 0)
[E5] = Cells(Ligne, "L")
ElseIf Not Intersect(Target, [E5]) Is Nothing Then
Ligne = Application.Match([E5], [L1:L11], 0)
[B5] = Cells(Ligne, "K")
End If
Fin:
Application.EnableEvents = True
End Sub