In Excel, I am in need of having more than one dropdown list in a worksheet, and I must be able to make multiple selections in each one.

Fernando Castro 20 Reputation points
2026-04-29T16:06:10.9133333+00:00

I am familiar with VBA code and the Data Validation features built into Excel, but I cannot find a way to apply the VBA code to more than one dropdown list. I note that there is no dependency between each of the dropdown lists. In other words, the multiple selections in the dropdowns are independent from each other.

Developer technologies | Visual Basic for Applications

Answer accepted by question author
Jack Dang (WICLOUD CORPORATION) 18,980 Reputation points Microsoft External Staff Moderator
2026-04-30T04:17:18.8333333+00:00

Hi @Fernando Castro ,

Thanks for reaching out.

The code below is intended as a reference example, so you may need to adjust the cell ranges, separator, or duplicate-handling logic to fit the exact layout and requirements of your workbook.

You can do this with one Worksheet_Change event. The idea is to tell the code which cells should behave as multi-select drop-downs, then let the same logic run for any of those cells.

Place the code below in the worksheet module where the drop-downs are located. To get there, right-click the sheet tab, choose View Code, and paste it there. It should not go into a regular module.

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim DropDownCells As Range
    Dim NewValue As String
    Dim OldValue As String

    On Error GoTo ExitHandler

    'Update these ranges to match your drop-down cells
    Set DropDownCells = Union(Me.Range("B2:B10"), Me.Range("D2:D10"), Me.Range("F2:F10"))

    If Target.CountLarge > 1 Then GoTo ExitHandler
    If Intersect(Target, DropDownCells) Is Nothing Then GoTo ExitHandler

    Application.EnableEvents = False

    NewValue = Target.Value

    Application.Undo
    OldValue = Target.Value

    If OldValue = "" Then
        Target.Value = NewValue
    ElseIf NewValue = "" Then
        Target.Value = ""
    Else
        If InStr(1, ", " & OldValue & ", ", ", " & NewValue & ", ", vbTextCompare) = 0 Then
            Target.Value = OldValue & ", " & NewValue
        Else
            Target.Value = OldValue
        End If
    End If

ExitHandler:
    Application.EnableEvents = True
End Sub

The part you would adjust is this line:

Set DropDownCells = Union(Me.Range("B2:B10"), Me.Range("D2:D10"), Me.Range("F2:F10"))

For example, if the drop-downs are only in a few specific cells, you could write it like this instead:

Set DropDownCells = Union(Me.Range("B2"), Me.Range("D5"), Me.Range("H3"))

After that, each listed cell will keep its own selections independently. When you pick another item from one of those drop-downs, the code adds it to the existing value in that same cell, separated by a comma. It also avoids adding the same item twice.

Just make sure the workbook is saved as a macro-enabled workbook, such as .xlsm, and that macros are enabled when you open it.

Hope this helps! If my answer was helpful, I would greatly appreciate it if you could follow the instructions here so others with the same problem can benefit as well.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.