Hi,
I'm using the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$J$3" Then
Range("K3").Select
Selection.ClearContents
End If
End Sub
Additionally: based on a selection in J3 (from a dropdown list), K3 is populated (also a dropdown list). This code clears K3 (and L3 in which I'm using a vlookup) when J3 is changed. Nice!
Now for my question: I would also like to use this for J4 (clears K4), J5 (clears K5) etc. How can I do this without having to repeat this code?
Thanks for helping out this newbie!
I'm using the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$J$3" Then
Range("K3").Select
Selection.ClearContents
End If
End Sub
Additionally: based on a selection in J3 (from a dropdown list), K3 is populated (also a dropdown list). This code clears K3 (and L3 in which I'm using a vlookup) when J3 is changed. Nice!
Now for my question: I would also like to use this for J4 (clears K4), J5 (clears K5) etc. How can I do this without having to repeat this code?
Thanks for helping out this newbie!