You can quickly run a macro using a drop down list. The drop down list may contain multiple macro names.

Run a macro from a drop down list

Here is how I did it.

Create a drop down list

  1. Select cell B2
  2. Go to tab "Data"
  3. Click "Data validation"
    run a macro from a drop down list
  4. Select list
  5. Type your macro names in Source: field, separated by a comma.
  6. Click ok.

Recommended article

Toggle a macro on/off using a button

This post demonstrates using a single button (form control) to turn a macro on or off. Assigned vba macro I […]

Comments(4) Filed in category: Check-boxes, Excel, Macro

Create a change event

  1. Right click on sheet name
  2. Click "View code"
    view excel sheet code
  3. The Visual Basic Editor opens. Copy vba event code below.
  4. Paste to sheet1 code module
    view excel sheet code1
  5. Exit VB Editor (Alt + Q)

Recommended article

Add your personal excel macros to the ribbon

If you find yourself using the same macros over and over again, you can create a personal *.xlsb file that […]

Comments(2) Filed in category: Excel, User defined functions (udf), VBA

VBA Event code

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B2")) Is Nothing Then
    Select Case Range("B2")
        Case "Macro1": Macro1
        Case "Macro2": Macro2
    End Select
End If
End Sub

Recommended article

Excel toolbox: Save your custom functions and macros in an Add-In

Macros and custom functions are great, they can automate many tedious tasks. To have them available whenever you need them, […]

Comments(3) Filed in category: Excel, User defined functions (udf), VBA

Download excel *.xlsm file
Run a macro from a drop down list.xlsm