Private Sub Worksheet_Change(ByVal Target As Range)
col = Target.Column: lig = Target.Row
If col > 7 And col < 23 And lig > 6 And lig < 23 Then GoTo CelOk
If col > 7 And col < 23 And lig > 33 And lig < 50 Then GoTo CelOk
Exit Sub
CelOk:
If Cells(lig, col).Value = "" Or Cells(lig, col).Value = "/ /" Then Exit Sub
nom = Cells(lig, col).Value
a = 0
Do
a = a + 1:
Loop While LCase(Sheets("Liste" ).Cells(a, 3)) <> LCase(Cells(lig, col).Value) And a <> 500
If a = 500 Then Exit Sub
Cells(lig, col) = Sheets("Liste" ).Cells(a, 3)
Cells(lig, col - 5) = Sheets("Liste" ).Cells(a, 2)
Cells(lig, col + 16) = Sheets("Liste" ).Cells(a, 4)
End Sub |