Untitled

 avatar
unknown
plain_text
a year ago
871 B
14
Indexable
Private Sub Worksheet_Change(ByVal Target As Range)
    ' Check if the change happened in E7 (the first drop-down)
    If Not Intersect(Target, Me.Range("E7")) Is Nothing Then
        ' Clear the contents of the lower order drop-downs
        Me.Range("E8").ClearContents
        Me.Range("E15").ClearContents
        Me.Range("E16").ClearContents
    End If
    
    ' Check if the change happened in E8 (the second drop-down)
    If Not Intersect(Target, Me.Range("E8")) Is Nothing Then
        ' Clear the contents of the lower order drop-downs
        Me.Range("E15").ClearContents
        Me.Range("E16").ClearContents
    End If

    ' Check if the change happened in E15 (the third drop-down)
    If Not Intersect(Target, Me.Range("E15")) Is Nothing Then
        ' Clear the contents of the fourth drop-down
        Me.Range("E16").ClearContents
    End If
End Sub
Editor is loading...
Leave a Comment