Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A2:A1000")) Is Nothing Then
If Not IsError(Application.Match(Target, Sheets("Production").Range("A:A"), 0)) Then
IndexW = Application.Match(Target, Sheets("Production").Range("A:A"), 0)
If Sheets("Production").Cells(IndexW, "B") <> "" Then
Cells(Target.Row, "B") = Sheets("Production").Cells(IndexW, "B")
Cells(Target.Row, "C") = Sheets("Production").Cells(IndexW, "C")
Cells(Target.Row, "D") = Sheets("Production").Cells(IndexW, "D")
Else
MsgBox "Désolé, pas de N° OF associé à la ressource " & Target
Application.EnableEvents = False
Target = ""
Application.EnableEvents = True
End If
Else
MsgBox "Ce N° de ressource n'existe pas."
Application.EnableEvents = False
Target = ""
Application.EnableEvents = True
End If
End If
End Sub