Formula:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("a6")) Is Nothing Then
Select Case Target
Case "duo1"
Application.EnableEvents = False
Range("a7:c20").Value = Sheets("duo").Range("a6:c19").Value
Application.EnableEvents = True
Formula:
If Intersect(Target, Range("A7:A20, A38:A51, K7:K20, K38:K51, V7:V20, V38:V51")) Is Nothing Then Exit Sub
Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
Dim rng4 As Range
Dim rng5 As Range
For Each rng1 In Sheets("Gare").Range("A1:A92")
If rng1 = Target Then
With Cells(Target.Row, Target.Offset(0, 1).Column).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=Gare!$C$5:$C$16"
End With
With Cells(Target.Row, Target.Offset(0, 2).Column).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=Gare!$C$5:$C$16"
End With
Exit For
End If
Next rng1
once the data is transferred using the first code the second code should update the drop down lists but it will do so if i double click the target or entering it manually
it does not do it automatically.
Bookmarks