The article shows how to create an Excel drop down that allows users to select multiple items with or without duplicates.
Excel has come a long way since its inception and introduces more and more useful features with each new release. In Excel 365, they've added the ability to search within data validation lists, which is a huge time-saver when working with large sets of data. However, even with this new option, out-of-the-box Excel still only allows selecting one item from a predefined list of options. But fear not, as there is a solution. By using VBA, you can create drop-down lists with multiple selections. With the ability to prevent duplicates and remove incorrect items, this feature can streamline data input and improve accuracy in your Excel spreadsheets.

How to make Excel drop down with multiple selections
Creating a multi-select drop down list in Excel is a two-part process:
- First, you make a regular data validation list in one or more cells.
- And then, insert the VBA code at the back end of the target worksheet.
It also works in the reverse order :)
Create a normal drop-down list
To insert a drop down list in Excel, you use the Data Validation feature. The steps slightly vary depending on whether the source items are in a regular range, named range, or an Excel table.
From my experience, the best option is to create a data validation list from a table. As Excel tables are dynamic by nature, a related dropdown will expand or contract automatically as you add or remove items to/from the table.
For this example, we are going to use the table with the plain name Table1, which resides in A2:A25 in the screenshot below. To make a picklist from this table, the steps are:
- Select one or more cells for your dropdown (D3:D7 in our case).
- On the Data tab, in the Data Tools group, click Data Validation.
- In the Allow drop-down box, select List.
- In the Source box, enter the formula that indirectly refers to Table1's column named Items.
=INDIRECT("Table1[Items]")
- When done, click OK.

The result will be an expandable and automatically updatable drop-down list that only allows selecting one item.
Tip. If the method described above is not suitable for you for some reason, you can create a dropdown from a regular range or named range. The detailed instructions are here: How to create Excel data validation list.
Insert VBA code to allow multiple selections
This is the core part of the process that does the magic. To turn a regular single-selection picklist into a multi-select dropdown, you need to insert one of these codes in the back end of your target worksheet:
- VBA code for multi-select drop down with duplicates
- VBA code for multi-select drop down without duplicates
- VBA code for multi-selection dropdown with item removal
To add VBA code to your worksheet, follow these steps:
- Open the Visual Basic Editor by pressing Alt + F11 or clicking the Developer tab > Visual Basic. If you don't have this tab on your Excel ribbon, see how to add Developer tab.
- In the Project Explorer pane at the left, double-click on the name of the worksheet that contains your drop-down list. This will open the Code window for that sheet.
Or you can right-click the sheet's tab and choose View Code from the context menu. This will open the Code window for a given sheet straight away.
- In the Code window, paste the VBA code.
- Close the VB Editor and save your file as a Macro-Enabled Workbook (.xlsm).

That's it! When you go back to the worksheet, your drop-down list will allow you to select multiple items:
VBA code to select multiple items in dropdown list
Below is the code to make a data validation list that allows selecting multiple items, including repeated selections:
How this code works:
- The code enables multiple selections in all drop down lists on a particular sheet. You do not need to specify the target cell or range reference in the code.
- The code is worksheet specific, so be sure to add it to each sheet where you want to allow multiple selections in drop down lists.
- This code allows repetition, i.e. selecting the same item several times.
- The selected items are separated with a comma and a space. To change the delimiter, replace ", " with the character you want in DelimiterType = ", " (line 7 in the code above).
Note. The same character cannot be used as both the delimiter and part of the dropdown items. In our code, the default delimiter is a comma followed by a space (", "), so this combination of characters should not appear anywhere within the dropdown items themselves to avoid conflicts. If you change the delimiter to a single space (" "), bear in mind that the code will only function correctly for single-word items, failing to handle multi-word items containing spaces.
Excel multi-select dropdown without duplicates
When selecting from a large list, users can sometimes pick the same item more than once without noticing. The code below solves the problem of duplicates in a multi-selection data validation drop down list. It lets users pick a particular item only once. If you try to select the same item again, nothing will happen. Pretty cool, right?
Multi-selection dropdown with item removal
When users need to select multiple options but can make mistakes or change their minds during the selection process, a multi selection dropdown that allows for the removal of incorrect items can be a lifesaver.
Consider a scenario where you need to assign multiple tasks to team members using a drop-down list. With Excel's default functionality, the only way to remove an incorrectly assigned task is by clearing the entire contents of the cell and starting over. With the ability to remove individual items from the selection, the team can effortlessly modify task assignments without confusion or errors.
The code below implements the item removal functionality in a simple and intuitive way: the first click on an item adds it to the selection, and a second click on the same item removes it from the selection.
The below demo highlights how the multi selection dropdown with removal functionality works in Excel. The users can select multiple options from the data validation list and make adjustments on the fly. A streamlined and effective approach to managing selections!
How to make a multiple selection dropdown with custom delimiter
The character that separates items in the selection is set in the DelimiterType parameter. In all the codes, the default value of this parameter is ", " (a comma and a space) and it is located in line 7. To use a different separator, you can replace ", " with the desired character. For instance:
- To separate the selected items with a space, use DelimiterType = " ".
- To separate with a semicolon, use DelimiterType = "; " or DelimiterType = ";" (with or without a space, respectively).
- To separate with a vertical bar, use DelimiterType = " | ".
For example, if you change the delimiter to a vertical slash, your multi-select picklist will look as follows:
How to create dropdown with multiple selections in separate lines
To get each selection in a separate line in the same cell, set DelimiterType to Vbcrlf. In VBA, it is a constant for the carriage return and line feed characters.
More precisely, you change this code line:
DelimiterType = ","
to this one:
DelimiterType = vbCrLf
As a result, each item that you select from the dropdown list will appear in a new line:
How to create multi-select dropdown for specific columns, rows, cells and ranges
All the codes described in this tutorial work across an entire sheet. However, you can easily modify any of the codes, so it only applies to specific cells, rows, or columns as needed. For this, find this line of code:
If rngDropdown Is Nothing Then GoTo exitError
Add immediately after it, add a new line specifying where to allow multiple selections, as explained in the below examples.
Multi-select drop-down for specific columns
To allow selecting multiple items in a certain column, add this code:
If Not Destination.Column = 4 Then GoTo exitError
Where "4" is the number of the target column. In this case, the multi-select dropdown will be only enabled in column D. In all other columns, dropdown lists will be limited to a single selection.
To target several columns, specify their numbers using this code:
If Destination.Column <> 4 And Destination.Column <> 6 Then GoTo exitError
In this case, the multi-select dropdown will be available in columns D (4) and F (6).
Multi-selection dropdown for certain rows
To insert multiple drop-downs in a specific row, use this code:
If Not Destination.Row = 3 Then GoTo exitError
In this example, replace "3" with the row number where you want to enable multi-select dropdowns.
To target multiple rows, the code is as follows:
If Destination.Row <> 3 And Destination.Row <> 5 Then GoTo exitError
Where "3" and "5" are the rows where selecting multiple items is allowed.
Multiple selections in specific cells
To enable multiple selections in particular cells, add one of the below code lines.
For a single cell:
If Not Destination.Address = "$D$3" Then GoTo exitError
For multiple cells:
If Destination.Address <> "$D$3" And Destination.Address <> "$F$6" Then GoTo exitError
Just remember to replace "$D$3" and "$F$6" with the addresses of your target cells.
Multi-select drop-down for specific range
To limit your multi-select dropdown to a particular range, replace this line of code:
If Intersect(Destination, rngDropdown) Is Nothing Then
with this one:
If Intersect(ActiveCell, Range("C3:D10")) Is Nothing Or Intersect(Destination, rngDropdown) Is Nothing Then
The range of interest is specified directly in the code (C3:D10 in the above example). This modification offers a more efficient approach to handing ranges - instead of individually listing 16 cells, you use a single range reference.
How to enable multi-selection functionality in protected sheet
To enable a multi-select dropdown functionality in a protected worksheet, simply insert the following code into the sheet where you've added the primary code. This "protected sheet" code should be added after the main code.
Before adding this code to your worksheet, remember to replace "password" with the actual password you used to protect the sheet. And this is the only change that needs to be made. The code will automatically detect the presence of a dropdown list in a given cell and allow editing of that cell. In all other cells, editing will remain restricted.
Note. Please be aware that including your real password in the code could lead to a security risk. To ensure the safety of your workbook, store it in a secure location that is protected against unauthorized access or use.
So, there you have it - an Excel dropdown list with multiple selections. Adding this awesome feature to your spreadsheets will increase the accuracy of your data input and help you get your work done faster!
Practice workbook for download
Multi-selection dropdown - examples (.xlsm file)
514 comments
I love the code and it works flawlessly...
When I open it in the desktop version. When i try to use it online the code doesn't work.
Hi! This question has been asked many times before, as you can see from the comments below. Excel Online does not support Visual Basic for Applications (VBA) or VBA macros.
When trying to use your code Multi-selection dropdown with item removal, I receive an error when trying to select my first item from the list. It says, "Compile error: Can't find project or library." The code without item removal works fine within the same sheet.
Hello David!
Carefully copy the code, following all instructions above. You can also download sample file, the link to which is at the end of the article. All codes in this file work correctly.
Industrial Engineer here. Thank you so very much for sharing your expertise!! You are appreciated! I tried this with the removal option and had no issues. For anyone trying, you need to save the spreadsheet then close out of excel completely. Open the sheet again and your changes will now be active!
Thank you so much for this!
Just curious, though - when I select only one item from the list and try to move on to the next cell (e.g., when I press Tab or Enter), it will automatically go back to the original cell, where I had only selected one item. This is resolved by clicking either tab or enter a second time, but I was wondering if there is another work-around for this? I am using the "Multi-selection dropdown with item removal" version of this code and have opted to use ";" as a custom delimiter.
Thanks!
Hello Kevin!
Unfortunately I was not able to reproduce your problem. The macro proposed in the article doesn't change anything about how dropdown list works. It only allows you to select multiple values from drop-down list if necessary.
OMG, I finally managed!! Thank you so much, this is GOLD! This is the only way I was actually able to get the code done and to work. Thank you SO MUCH for explaining this as simply put as it code can be :)
Hello, i used your VBA code for multiple selections and removal. The removal isn't working. when i click on an item ive already added it doesnt do anything. Can you help me with this?
Hello,
Thanks a lot for this post, it has been of great help as I was struggling to have this macro allowing to select multiple values from a drop-down list, to work for only one column.
Thanks again !
I have 2 multi choice selections on my sheet, I have set up my data validation for one, column I, to be dependent on the other, column H, using the XLOOKUP function. When I have one item selected in column H this formula works, and I am able to select multiple items from the specified range of whatever I put into H. However, as soon as I pick more than one thing in column H, I can't pick anything in column I. The drop down button appears, but I cannot click it to make a selection. Is there a way for me to pick multiple items for column H and get a list in I of just the ranges the correspond to the items in H?
Hi! You can split text string that is created by multiple selections drop-down list into separate strings. You can use these instructions to do so: How to split text string in Excel by comma, space, character or mask.
You can then create list of values that matches these strings. Here are the detailed instructions: Set up dependent drop-down list for multiple rows in Excel.
Hi! Thanks so much for this, it's so helpful. I now need to filter the data by some of the items on the dropdown. Is there any way to make the filter such that any I can see all the rows that selected one category, even if that row has multiple selected? So for example, the drop down list contains A, B, and C, and I want to filter for A. Right now, I can filter by "A" or "A and B" or "A, B, and C" separately. However, I want to filter for all that contain A including rows that contain A and B, etc. Does that make sense?
Hi! To filter rows by part of the text string, you can use a text filter with the “Contains...” option. Read more: Filter text data.
You can also use FILTER function as described in these instructions: Filter cells that contain certain text.
Hi
I want an option to enter text manually if user select "other" option in drop down How to do that?
Hi! I think it can be done with another VBA macro
Hello,
I was wondering if I would be able to use the data from the multi-selected dropdowns in charts and graphs? Is there a way to implement this?
Hello Monica!
Excel drop down list with multiple selections creates a text string of multiple elements in a cell. You can use it in charts and graphs as a normal text value.
I got the macros working, but every time I close and reopen the sheet, the function stops working. Is this to do with my Macro Security settings?
Hello Tom!
Maybe this article will be helpful: How to enable and disable macros in Excel.
Hi,
I'm curious if once you have this setup in your sheet, which I do and it is working fabulously, I have another dependent drop-down list that I would like to pull based on the multiple selections in the original cell. Note, I used your additional code to limit the multi-selection to one single cell in my sheet.
So say in my multi-selection cell I have a user choose the options, "Apple," and, "Bread"
In the second dependent drop-down, using the indirect function I assume, I would like to then see the full list of apples and the full list of breads in the one single drop-down.
Is this possible?
Hello Jeremy! This has been discussed several times in the comments below. The standard functions of the drop down list do not allow you to do this. It is only possible using additional VBA code.
Does this address if you have your data validation source list on one tab and the drop-down on another? I may have missed that detail in the instructions. Thanks!
Hello Jennifer!
The source of the data for the drop down list can be located on any of the sheets in your workbook. We have a special tutorial on this. Please see: Create drop down list in Excel: static, dynamic, editable, searchable. In the examples that are presented in this article, the data source for the drop-down list is a named range.
Hello Alexander,
The code works great thank you! However, it seems that I am the only one able to use multiple selections within the drop down menu, while my team members are not able to. They, and I are not prompted with any errors when doing so. Any insight here?
Kind Regards,
Hi! If you’re sharing a file using Excel Online, be aware that VBA macros are not supported there.
Hey Alex!
We are using a spreadsheet which is collaborated on through OneDrive. The workbook is macro-enabled, and the code works perfectly for me, but not teammates.
Thank you for the help on this.
Hi! When you open a file from OneDrive in the desktop version, keep in mind that Microsoft has a default setting that blocks macros from the Internet. You may want to add the file to a trusted location or make sure it is not marked as downloaded from the internet.
Has a workaround been found to solve this issue yet? I am also having the same issue when using the Excel file as a SharePoint.
Hi! Thank you for this article, it's been very helpful. I used the Multi-selection dropdown with item removal VBA and I am wondering if there's a way to allow custom text as well? I kept getting an error message when I tried to add text after using the drop down list, so I removed the option for an error message in Data Validation, which now let's me add text but it duplicates everything within the cell.
For example, say my list is Apples, Carrots, and Oranges, and I want to add "(green)" after Apples to only one specific cell, this appears:
"Apples (green)
Carrots
Oranges
Apples (green)
Carrots
Oranges"
If I try to delete the duplicate, it just adds another. Hope this makes sense! Thanks in advance.
Hello Laura!
The drop down list is used to validate the data you write in a cell. In a drop down list with multiple selections, you cannot change the text string that you have created. I recommend that you add all the variations you want in the data source for the drop down list.
I used these instructions to create a wonderful multi-select drop-down. I am now having trouble with finding the correct formula to be able to tally all of the selections. When using a =CountIF range and selecting one option that shows within the list - it only counts those that has ONLY that option in the list. Is there a formula that will count each instance of the item, even if it occurs with other items within the same cell?
Hi! If I understand correctly, using the multi-select drop down list, you have created a text string of multiple items. To calculate values for each of these items, split the text into separate cells using these guidelines: How to split cells in Excel: Text to Columns, Flash Fill and formulas or TEXTSPLIT function in Excel: split text strings by delimiter.
After that, you can use the COUNTIF formula.
OR - should I be using a different way to count things? (Pivot table?
For example, Suzy likes apples, oranges, pears; John likes apples, pears - I want to know in a quick glance - 2 people like apples, 2 people like pears, and one person likes oranges.
Maybe this guide will be helpful: COUNTIF with wildcard characters (partial match)
Hi, I am using the 'Multi-selection dropdown with item removal' VBA and it works wonderful. But I was using this on a Protected sheet, So I even added the VBA from 'How to enable multi-selection functionality in protected sheet' part. It was throwing an error saying, "Ambiguous name detected" and was highlighting - Private Sub Worksheet_SelectionChange(ByVal Target As Range) part of the code. Can you please guide me on this. Thank you.
Hi! I can't see your VBA code and therefore can't help. I assume that you have duplicated part of the code. Try removing all the code and re-inserting it according to the instructions provided in the article.
Hi,
Thank you for the great guide. Is there anyway to force the drop down selection to stick to an alphabetical order?
Kind regards,
Sarah
Hello Sarah!
You can sort the values that are used for the dropdown list using one of these methods: How to sort in Excel by row, column names and in custom order.
As I have already written in the comments below, you can sort a text string that is created using a multiple selection drop down list using a VBA macro.
Hello, I used the macro for multiple selection and separating each item on its own line. Thank you for the guidance. I am using Excel on Mac and have enabled macros, then formatted my sheet into a table. I'm not receiving a run time error of 502990, Enable events of object application failed. When I run the debug its highlighting this part of the VBA code : Application.EnableEvents = True
of note, my lists arent all being referenced through INDIRECT rather than just the source of the different sheet in the same workbook. Inputs for the lists are text but not formatted as anything particular.
Any insights you can impart would be appreciated, thank you!
Hello Nancy!
VBA code written for Windows may not work correctly on Mac due to differences in the operating systems.
Many features and libraries that are available on Windows are not supported on macOS.