|
Home > Validation > Drop Downs > Multiple Selection Excel Drop Down Multiple Selections
|

Put multiple selections in a cell, with an Excel drop down list. My short video shows how the Excel multi select dropdown works, and get my Excel file to try it out!
In the the Multi Select sample file, there is a basic drop down list on the worksheet named "Single". In the Staff column, shown below:

After you build a basic drop-down list, you can change it to a multiple selection drop down. When you select another name, it's added in the active cell, after any existing nems.

There are 5 steps to set this up, and the step-by-step details are in the sections below:
Tip: You can practise this setup in my Multi Select sample file. Later, do the same steps in your own Excel file.
In the Multi Select sample file, on the Multi sheet, there a multiple selection drop down list, in column C.
In the screen shot below, I've already selected 2 names in cell C3, and I'm adding another name.

The Multi sheet has a background macro, that runs automatically, when you make a change on the Multi sheet.

The Excel Visual Basic for Applications (VBA) window will open.

To copy the Multi sheet code onto the Single sheet, follow these steps:
To paste the Multi sheet code onto the Single sheet, follow these steps:
A) No Code: If the code window is empty, or just has an Option Explicit line, follow these steps:

B) Existing Code: If the code window has anything more than an Option Explicit line, do NOT delete the existing code!
After you add the code to the Single sheet, be sure to test it.
The code should run automatically when you make a change to the worksheet, and add the new name in the same cell.

The final step is to save the file in a macro-enabled format, if you haven't done that already.
To save as macro enabled, follow these steps:
Note: Later, when you open the workbook, you might have to enable macros in order to use this macro code.
The following code example should be copied onto each worksheet module where you want to use the multiple selection technique. This code adds multiple items in the active cell, separated by a comma.
There are many more code examples in the sample workbooks that you can download below.
| ▶ |
Note: This code does not work if the sheet is protected. Be sure to unprotect the sheet before running this macro. |
Private Sub Worksheet_Change(ByVal Target As Range) ' Developed by Contextures Inc. ' www.contextures.com Dim rngDV As Range Dim oldVal As String Dim newVal As String Dim dvCol As Long
Dim mySep As String
dvCol = 3
mySep = ", " If Target.Count > 1 Then GoTo exitHandler On Error Resume Next Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation) On Error GoTo exitHandler If rngDV Is Nothing Then GoTo exitHandler If Intersect(Target, rngDV) Is Nothing Then 'do nothing Else Application.EnableEvents = False newVal = Target.Value Application.Undo oldVal = Target.Value Target.Value = newVal If Target.Column = 3 Then If oldVal = "" Then 'do nothing Else If newVal = "" Then 'do nothing Else Target.Value = oldVal _ & ", " & newVal ' NOTE: you can use a line break, ' instead of a comma ' Target.Value = oldVal _ ' & Chr(10) & newVal End If End If End If End If exitHandler: Application.EnableEvents = True End Sub
If the worksheet is protected, the Cells.SpecialCells(xlCellTypeAllValidation) code will not work. Instead, you can check the .Validation.Type property of the target cell, to see if it contains a drop down list.
This example is on the SameCellProtect sheet in the sample file. It is set up to work on column 3 only.
Private Sub Worksheet_Change(ByVal Target As Range) ' Developed by Contextures Inc. ' www.contextures.com 'code runs on protected sheet Dim oldVal As String Dim newVal As String Dim strType As Long Dim dvCol As Long
Dim mySep As String
dvCol = 3
mySep = ", " If Target.Count > 1 Then GoTo exitHandler 'checks validation type of target cell 'type 3 is a drop down list On Error Resume Next strType = Target.Validation.Type If Target.Column = dvCol3 And strType = 3 Then Application.EnableEvents = False newVal = Target.Value Application.Undo oldVal = Target.Value If oldVal = "" Or newVal = "" Then Target.Value = newVal Else Target.Value = oldVal _ & mySep& newVal End If End If exitHandler: Application.EnableEvents = True End Sub
Did the multi select code work correctly, on the Single sheet?
If the multi-select code did NOT work correctly, you might need to make a small change to the macro code.
In the Multi Select code that you copied, there are two variables that you can change, if needed -- dvCol and mySep.

1) Variable dvCol
The dvCol variable tells the macro which column has the data validation drop down that you want to set as multi-selection.
If the drop down is in a different column in your workbook, change the dvCol number. For example, for column F, change dvCol to 6.
dvCol = 6
2) Variable mySep
The original code uses a comma and space character to separate the names
mySel = ", "
In your workbook, you could change the separator to something different, such as a semicolon and space
mySel = "; "
Here are a few mores examples of how you can change the Multi Select Code
Instead of a single column, add more columns in the code. For example:
If Target.Column = 3 _ Or Target.Column = 5 _ Or Target.Column = 6 Then
Or, use a starting and ending column. For example:
If Target.Column >= 3 And _ Target.Column <= 10 Then
Or, include a starting row as well. For example:
If Target.Column = 3 _ And Target.Row >= 4 Then
Or, if you don't want to limit the code to a specific column, you could delete the two rows that are marked with a red dot. When those lines are removed, the code will run when any cell with a drop down list is selected.

In some code samples, the sheet names and named ranges are included. You will have to change these to match your sheet names and range names.
For example, shown below is a portion of the code from the LineBreakAddSort sheet. The sheet and range names are highlighted in yellow.
Also, this code is set up for a list in column 3.
i=ws.Cells(Rows.Count,3).End(xlUp).Row + 1
You would need to change that number, if your list is in a different column.

With this technique, you can select multiple items from a drop down list, but if you try to edit the cell, you might see a data validation error alert, or find that the VBA code simply added your revised text, to the existing text -- probably not the result that you wanted!
In the sample file, on the SameCellEdit worksheet, there is an "Edit Entries" check box. Check that box, and you can edit the cell, without any problems.
To edit a cell with multiple items selected:
Press Enter, to complete the editing

After you finish editing the cell(s), press Enter, to complete the editing. Then, remove the check mark from the Edit Entries check box.
To add a check box on your worksheet, follow the steps below:
In the sample file, you can see the code that allows editing when the Edit Entries box is checked. In the screen shot shown below, the EditMode range is set as a variable (rngEdit), and the code looks at that cell's value.
On the SameCellAddSort sheet in the sample file, there is an example where you can add new items to the drop down lists, but only in specific columns (C and D).
The new items are added to the Lists worksheet, and then the list is sorted A-Z.
To see this example, and how the Excel VBA code works, watch this short video tutorial
Video Timeline
On the SameCellNoDups sheet, there is an example where you are not allowed to select the same item twice in any of the cell.
On the SameCellNoDupsCol sheet, duplicate selections are allowed in cells in columns B and D, but no duplicates can be entered in the cells in column C.

On the SameCellAddRemove worksheet, there is an example that lets you remove items if they been previously selected. For example, the cell contains four items -- "One, Two, Three, Four".
When you select Three again, that number is removed from the cell, instead of being added at the end of the cell.
This video shows how the multiple select and remove features work. You can also see the Excel VBA code, and the steps that it goes through, when you make a selection in the drop down list.
If you enter multiple items in a cell, you will see each unique combination of items in the AutoFilter drop downs. That can make it difficult to filter for a specific item, such as "Two".

As a workaround, you can use one of the techniques shown below:
--13.1) Use the Search box to find items that contain specific text
--13.2) Use a Slicer to filter for specific text.
In Excel 2010 and later, type in the filter Search box, just above the list of filter options. The list is automatically filtered as you type, to show only the items that contain the text that has been entered in the Search box..

This short video shows the steps for searching in the AutoFilter list.
In this example, there are multiple weekday names selected in the WorkDays column. Above the table, click on a Slicer, to filter the WorkDays column for any rows that contain the selected weekday name.
In the sample file, code runs automatically, to allow multiple selection, and and to filter the WorkDays column.
You can get this sample file in the Download section, below, and there are notes in the Excel file, on how this technique is set up.

Don't miss my monthly Excel newsletter! You'll get quick tips, article links, and a bit of fun. Add your email, and click Sign Up.
Next, when you get my reply, click the Confirm button. I add this step to protect you from spam!
This is the main page for the data validation multiple selection technique. I have also written several blog articles, and you can join in the discussion in the comments there:

Last updated: October 2, 2026 12:57 PM