Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range, Cible As Range, Sh As Worksheet
Select Case True
Case Target.Columns.Count = Me.Columns.Count 'Ligne entière selectionnée
Case Target.Rows.Count = Me.Rows.Count ' Colonne entière selectionnée
Case Else
For Each Cell In Target.Cells
Select Case True
Case Cell = vbNullString ' on ne fait rien si vide
Case Intersect(Cell, Union(Columns("B"), Columns("F"), Columns("G"))) Is Nothing
Case Cells(Cell.Row, "B") = "" ' pas d'ordi ..
Case Cells(Cell.Row, "G") = "" ' pas de nouvelle salle
Case Else
Set Sh = Worksheets("Entrée - Sortie")
Set Cible = Sh.Columns("D").Find(Cells(Cell.Row, "B"))
If Not Cible Is Nothing Then ' Modif Ligne trouvée
Sh.Cells(Cible.Row, "B") = Cells(Cell.Row, "F") ' N
Sh.Cells(Cible.Row, "C") = Cells(Cell.Row, "G") ' Nouvelle Salle
Else
MsgBox Cells(Cell.Row, "B") & " n'est pas dans l'inventaire"
End If
End Select
Next
End Select
End Sub