The dependent drop-down is all about showing values in a drop-down list according to the selection of the value in another drop-down.
Today, in this post, I’d like to share with you a Simple 7-Steps Process to create this drop-down. But first of all, let me tell you why it is important. In the below example, you have two drop-down lists. The size drop-down is dependent on the product drop-down.
If you select the white paper in the product cell then in size drop-down will show small and medium. But, if you select gray paper then its size will be medium and large.
So here the basic idea to create a dependent drop-down list is to get the correct size as per the product name. Let’s get started.
Steps to Create a Dependent Drop-Down List in Excel
For creating a dependent drop-down list we need to use named ranges and indirect functions.
- First of all, you have to create named ranges for drop-down lists. For this, select the product list. Go to -> Formulas -> Defined Names -> Create from the selection.
- You’ll get a pop-up. Tick mark “Top Row”
- & click OK.
- By using the same steps, create two more named ranges for sizes. One is for white paper and the second is for gray paper.
Quick Tip: By using this method to create a named range, the value in the first cell will be considered as the name, and the rest of the values as the range. You can also use a dynamic named range for this.
- Now select the cell where you want to add the product drop-down and Go to -> Data -> Data Tools -> Data Validation.
- In the data validation window, select “List” and in “Source” enter the below formula and then click OK.
- Select the cell where you want to add a size drop-down list. Go to -> Data -> Data Tools -> Data Validation.
- In the data validation window, select “List” and in “Source” enter the below formula and click OK.
Finally, your dependent drop-down list is ready.
How Does it Work
First, you have created three named ranges. Then we used one named range to create a product drop-down. After that, for the second drop-down list, you have used the indirect function & refer to the value in the product cell.
If you notice, our size-named ranges have a name equal to the values we have in the product drop-down.
When we select “WhitePaperSheet” in the product cell, then in the size cell indirect function refers to the named range “WhitePaperSheet” and when you select “GreyPaperSheet” it will refer to the named range “GreyPaperSheet”.
Three-Level Dependent Drop-Down List
In the above example, you have created a two-level dependent drop-down list. But sometimes, we need to create a list with three-level dependencies. For this, all you have to do is create a third drop-down list which is dependent on the selection of the second drop-down list.
Let’s say we want to add a drop-down list with “Length x Width” of the sizes for paper sheets.
And, for this, you have to create a third drop-down list that will show the “Length X Width” as per size selection.
Here are the steps:
- Create three more named ranges using the same method which we have used above.
- Select the cell where you want to insert your third drop-down.
- Open drop-down options & insert the following formula in the source.
- Click OK.
Now, your three-level drop-down list is ready