Limit the choices in one Excel drop down list, based on the value in another cell. This example uses dynamic arrays and spilling to create the lists used in the drop downs. Select a region name, and then select an employee from that region.
NOTE: Dynamic arrays are available in Microsoft 365 plans. For other versions of Excel, without dynamic arrays, use other techniques for setting up dependent drop down lists.
This video shows how to set up dependent drop down lists, based on dynamic arrays that have the items for each list. There are written instructions below the video.
On the Data Enrry sheet, there is a list with region and employee names. This list was formatted as an Excel Table. If names are added or removed, the list size will adjust automatically.
Data entry cells are set up at the top of the sheet, where you'll choose a region, and then you'll select an employee from that region.
For now, just the headings, fill colour and borders have been added
After everything is set up, those cells will have drop down lists, as you can see in this animated screen shot.
We want to create a drop down list of region names i cell F2. To get those region names, follow these steps to create a dynamic list of the unique region names
NOTE: When you create a dynamic array, try to leave enough empty rows below the formula cell, and empty columns to the right (if needed). If there's not enough room, Excel will show a #SPILL error, instead of the list
In some drop down list, the items will be easier to find if they're sorted alphabetically. Follow these steps to sort the list of region names.
Next, follow these steps to make a drop down list of region names, in cell F2
To test the drop down list of Region names:
In cell G2, we want a drop down list of employees. Instead of showing all the names, we'd only like to see the employees from the region that was selected in cell F2.
To create this dependent drop down list, we'll build another dynamic array formula, using the FILTER function.
Follow these steps to create the formula:
To test the dynamic list, select a different region name in cell F2. The list of employee names changes automatically. Here's the list after the East region was selected, with only 2 employee names showing.
Just like we did with the region name list, we'll use the SORT function in this list, to put the employee names in alphabetical order. Because this list has 2 columns, we'll type a 2 as the second argument, to tell Excel to sort by the 2nd column.
Follow these steps to sort the employee names.
Next, we'll use data validation to create a drop down list of employee names. This is a dependent drop down list -- its contents depend on what region was selected in cell F2.
Because the employee names are in a 2-column list, we'll use the INDEX function to return the names from the 2nd column. In the INDEX function,
Follow these steps to make a drop down list of employee names, in cell G2
To test the drop down list of employee names:
When cell F2 is empty, cell F2 shows a #CALC! error, because there's no region for the filter.
If you'd rather not see that error, use the IFERROR function to show an empty cell, or show a message.
For example, change the formula in cell F7 to the following:
=IFERROR(SORT(FILTER(A2:B11, A2:A11=F2),2), "Select a region")
The message, "Select a region", will show, instead of the #CALC! error.
NOTE: Dynamic arrays are available in Microsoft 365 plans.
Don't miss my latest Excel tips and videos! Click OK, to get my weekly newsletter with Excel tips, and links to other Excel news and resources.
Last updated: October 16, 2020 10:24 AM