How to run a macro when Dropdown List value is selected

← PrevNext →

Last Updated: 05th June 2026

Adding a drop-down list in Excel is easy with the Data Validation feature. A drop-down list lets you store multiple options in a single cell and quickly select the one you need from a convenient menu. Most Excel users stop there.

But what if selecting an item from that drop-down list could automatically trigger a macro or call a VBA procedure?

With a simple technique, you can make your drop-down lists interactive and automate tasks the moment a user makes a selection. In this tutorial, I'll show you exactly how to do it.

Dropdown List

A dropdown list with some values it. A macro (vba code) will be triggered when you select value from the list.

Excel dropdown list

Macro

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
   Debug.Print Target
End Sub

Notice that Target represents the cell or range that was changed. It can refer to any cell on the worksheet, but in this example, it refers to the cell containing our Data Validation drop-down list.

In-addition, you can use the value property too (be more clear). Like this...

Debug.Print (Target.Value)

run a macro when dropdown list value is selected in excel

Note: A Dropdown List in Excel is slightly different from a ComboBox in Excel. A ComboBox is an ActiveX control and has events (like the Change event). Capturing Excel dropdown list value using VBA, is different.

← PreviousNext →