Hi
I have a dependant drop down list and wish so that everytime i change the first list, it clears the dependant list to the right of it. I found the folllowing code on this site which clears the cell but is set only to clear a secific cell.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(ActiveCell, Range("H3")) Is Nothing Then
Exit Sub
Else
Range("I3").ClearContents
End If
End Sub
I wish for the code to clear the cell to the right on the active row as the drop down list is on several rows. I tried to put something together but it doesn't work. I'm new to VBA so i dunno if what i am doing is possible. See my 'attempt' below.
Private Sub Worksheet_Change(ByVal Target As Range)
CurrentCellRow = ActiveCell.Row
If Intersect(ActiveCell, Range(Cells(CurrentCellRow, 33))) Is Nothing Then
Exit Sub
Else
ActiveCell.Offset(0, 1).ClearContents
End If
End Sub
Hope this is clear and someone can help.
Many Thanks
Bookmarks