Hi,
I have a worksheet where a validation list choice in say sell A1 changes the validation list choices in B1 and if the validation list choice in A1 is changed the content of cell B1 is cleared allowing a different list of choices to be used.
The VBA code for this is:
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
However I want the dependant cell to be on a different row, say B2 instead of B1. Is this possible and of so how?
I have a worksheet where a validation list choice in say sell A1 changes the validation list choices in B1 and if the validation list choice in A1 is changed the content of cell B1 is cleared allowing a different list of choices to be used.
The VBA code for this is:
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
However I want the dependant cell to be on a different row, say B2 instead of B1. Is this possible and of so how?