You’ve probably used an Excel data validation drop down list, where you can click the arrow, and select an item to fill the cell. With a bit of programming, you can customize a drop down list, to select multiple items.
Single Selection Drop Down
By default, data validation drop downs only allow you to select one item.
In the worksheet shown below, you can select a month from the drop down, and it overwrites any previous selection in that cell.
Select Multiple Items From the Drop Down List
Instead of limiting users to a single selection, you can use a bit of programming, combined with the data validation list, and allow multiple selections.
You can display all the selected items across a row, or down a column, or keep them in the same cell.
Keep reading, to see some examples of this technique, and how it works.
There is also a video that shows the multiple selection drop down list. To try it for yourself, follow the download link for the sample file, near the end of this article.
More Articles on Select Multiple Items
[Update]: Since posting this article on selecting multiple items from an Excel drop down list, I’ve added more articles on this topic. Here are a few links to updates:
- how to set up multiple selection
- edit multiple selection cells
- prevent duplicates in multiple selection column
- select or remove multiple items from an Excel drop down list
You can find the full list on the main page for this technique:
Multiple Selection Options
In the sample file, there are different examples of the code, with options for where the selected items are placed. You might want all the items in a single cell, or in adjacent rows or columns.
Fill Across a Row
For example, each item selected in this drop down list fills the next empty cell at the right. You could use this technique to fill player names across a list of innings, or employee names for days of the week.
Fill Down a Column
In some worksheets, you might prefer to fill down, instead of across.
Add Values To the Same Cell
Instead of filling other cells, you can keep all the selections in the same cell, separated by commas.
Use Programming to Add Multiple Values
The code to allow multiple selections runs automatically when you make a change on the worksheet. To see the code for the SameCell sheet, in the sample file, you can right-click the sheet tab, and click on View Code.
In the code shown below, column 3 is the only one where the change will occur. In your workbook, you could change the 3 to a different number.
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 circle.
Download the Sample Data Validation File
To experiment with this technique, you can download the zipped sample file from the Contextures website, on the Excel Data Validation – Select Multiple Items page.
NOTE: In some of the code, you might have to change the range names or the sheet names, if you copy the code to a different workbook. Some code examples refer to a specific row or column number, and you might also need to adjust those.
In the sample file, a macro runs automatically when the workbook opens, to protect the “SameCell” worksheet. If you do not need that code, you can remove it from the ThisWorkbook module.
If you remove or rename the SameCell sheet, without deleting the Workbook_Open code, you will see an error message when the file opens.
Buy the Premium Version
There is a premium version of this technique, and you can see the details here: Data Validation Multi Select Premium. Instead of selecting from the drop down, a list box appears when you click the cell.
It automatically selects any items that are already in the cell. It also has buttons to Clear all the selections, and select all the items.
The premium version works with dependent lists too, and runs on a protected worksheet. There is also an option of showing a multi-select listbox, or a single-select version (this is helpful when working with dependent lists — you don’t want multiple items selected in the main columns).
The kit has 3 sample files, and a user guide, with details and screen shots, on how to add this technique to your own workbooks. Click here for details: Data Validation Multi Select Premium.
Watch the Data Validation Video
To see these techniques, and a few other multiple selection examples, you can watch this short video.