1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Sub Remplissage()
If Target.Column <> 3 Then Exit Sub
Lg = Target.Row
Set cel = Sheets("BDD").Range(Target("C1:C" & Lg - 1).Find(Target.Value, LookIn:=xlValues))
If Not cel Is Nothing Then
If IsEmpty(Sheets("BDD").Cells(Target.Row, 5)) Then Sheets("BDD").Cells(Target.Row, 5) = Sheets("BDD").Cells(cel.Row, 5)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 6)) Then Sheets("BDD").Cells(Target.Row, 6) = Sheets("BDD").Cells(cel.Row, 6)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 7)) Then Sheets("BDD").Cells(Target.Row, 7) = Sheets("BDD").Cells(cel.Row, 7)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 28)) Then Sheets("BDD").Cells(Target.Row, 28) = Sheets("BDD").Cells(cel.Row, 28)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 29)) Then Sheets("BDD").Cells(Target.Row, 29) = Sheets("BDD").Cells(cel.Row, 29)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 34)) Then Sheets("BDD").Cells(Target.Row, 34) = Sheets("BDD").Cells(cel.Row, 34)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 35)) Then Sheets("BDD").Cells(Target.Row, 35) = Sheets("BDD").Cells(cel.Row, 35)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 49)) Then Sheets("BDD").Cells(Target.Row, 49) = Sheets("BDD").Cells(cel.Row, 49)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 50)) Then Sheets("BDD").Cells(Target.Row, 50) = Sheets("BDD").Cells(cel.Row, 50)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 53)) Then Sheets("BDD").Cells(Target.Row, 53) = Sheets("BDD").Cells(cel.Row, 53)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 54)) Then Sheets("BDD").Cells(Target.Row, 54) = Sheets("BDD").Cells(cel.Row, 54)
If IsEmpty(Sheets("BDD").Cells(Target.Row, 55)) Then Sheets("BDD").Cells(Target.Row, 55) = Sheets("BDD").Cells(cel.Row, 55)
End If
End Sub |
Partager