SOLVED

Multiple drop down list

Copper Contributor

When I select AMR it shows me the list of names for AMR, after selecting one terminal, next if I choose ANZ, till I again go to the sub selection to select the list of names from the second selector, it still shows the name from AMR.  Is there a way that when I change AMR to ANZ, the secondary selector goes blank or chooses the first name from ANZ?  Thanks in advance for your help.2020-03-27_12-23-17.jpg

3 Replies
best response confirmed by sure19 (Copper Contributor)
Solution

@sure19 You can put this little macro in the code area for the worksheet (i.e. NOT in a separate module!!). It detects a change in cell D1 and blanks cell E1.

You workbook then has to be saved as a macro-enabled one (.xlsm).

 

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 4 And Target.Row = 1 Then
    
        Range("E1") = ""
         
    End If
End Sub

You can read more about it here: 

https://docs.microsoft.com/en-us/office/vba/api/Excel.Worksheet.Change 

@Riny_van_Eekelen  i did that and it worked.  Thanks very much

@sure19 Great! You're welcome.

1 best response

Accepted Solutions
best response confirmed by sure19 (Copper Contributor)
Solution

@sure19 You can put this little macro in the code area for the worksheet (i.e. NOT in a separate module!!). It detects a change in cell D1 and blanks cell E1.

You workbook then has to be saved as a macro-enabled one (.xlsm).

 

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 4 And Target.Row = 1 Then
    
        Range("E1") = ""
         
    End If
End Sub

You can read more about it here: 

https://docs.microsoft.com/en-us/office/vba/api/Excel.Worksheet.Change 

View solution in original post