View Single Post
  #5   Report Post  
narlo56 narlo56 is offline
Junior Member
 
Posts: 1
Talking

Thank you for posting very useful code for exactly the problem I was having.

I made one modification because I wanted to cause the A2 cell to simply go blank when a new item from A1 was selected, and show the correct list in A2.

Easy.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngParentCell As Range
Dim rngDepCell As Range
Dim rngCell As Range

Set rngParentCell = Range("A1")
Set rngDepCell = Intersect(Target, rngParentCell)

If Not rngDepCell Is Nothing Then
Set rngCell = Range("A2")
rngCell.ClearContents
End If

Set rngParentCell = Nothing
Set rngDepCell = Nothing
Set rngCell = Nothing

End Sub