Hi all
I have 2 data validation dropdown lists, the second of which is dependent on the first. All works well but I am trying to prevent any invalid changes that the users may make.
I have successfully used the following code which clears any 'downstream' selections (in column 3) if the 'upstream' selection (in column 2) is changed:
=============
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Column = 2 Then
If Target.Validation.Type = 3 Then
Application.EnableEvents = False
Target.Offset(0, 1).ClearContents
End If
End If
exitHandler:
Application.EnableEvents = True
Exit Sub
End Sub
=============
How can I can I update this code to clear any 'upstream' selections (in column 2) if the 'downstream' selection (in column 3) changes? I know that you can't select an "incorrect" downstream selection using the dropdown box, but Excel lets you copy and paste, e.g. from the rows above, onto a data validation cell, and this could then mean that the upstream selection is no longer valid.
Happy to try any suggestions you have.
Thanks
Al
Bookmarks