Mar 27 2020 11:03 PM
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.
Mar 28 2020 02:07 AM
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
Apr 02 2020 10:38 PM
@Riny_van_Eekelen i did that and it worked. Thanks very much
Mar 28 2020 02:07 AM
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