How to run a macro on worksheet change event like a change in selection in a drop-down list created using data validation. First we create a drop-down list using data validation. Now when we select a name from the drop-down list a macro is executed because we linked the target cell address with the macro. Watch the video and then study the VBA code:
Watch this video on YouTube.
Here’s the complete VBA code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = “$A$2” Then
Select Case Target.Value
The Target is the Range ($A$2) which has the data of names in a drop-down list. As soon as the user selects a name it triggers an action, i. e. fires up the relevant macro,