Please Note: This article is written for users of the following Microsoft Excel versions: 2007 and 2010. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Creating Dependent Drop-Lists.

Creating Dependent Drop-Lists

Written by Allen Wyatt (last updated August 2, 2021)
This tip applies to Excel 2007 and 2010


13

Carol asked if there is a way in Excel to create drop-down lists so that the second drop-down list is dependent on the selection made in the first drop-down list.

There are actually a number of different ways you can accomplish this task, ranging from simple formulas to complex macros. The method you choose depends, most directly, on the type of drop-down lists you want to create. There are actually three types of drop-down lists you can create in Excel:

  • Validation lists. If you want to limit input in certain cells, then you can create drop-down validation lists.
  • Forms lists. You can use the Forms tools (Developer tab of the ribbon, Controls group, Insert tool) to create drop-down lists. These are great if you are going to create a protected Excel form.
  • Userforms. These are dialog boxes, created in the VBA editor. You "run" a userform by calling it from a macro. This is the most versatile form of user interface, as it allows you the greatest latitude in what the user sees. (It also requires the most advanced knowledge of Excel in order to create.)

Rather than discuss how to create dependent drop-lists based on each of these types of drop-down lists, I'll choose to examine the simplest method, which will suffice for most people. If you use the INDIRECT function along with data validation lists, it is quite easy to get the result you want:

  1. On a blank worksheet in your workbook, create a list of the items that will be in the first drop-down list. For instance, create a list of departments in your company, such as Sales, Research, Executive, Production, etc. (These should be single-word entries in the list.)
  2. Select the list of items you created in step 1 and name the range using a name such as "Departments."
  3. On the same worksheet, create a list of items that could appear in the secondary drop-down list. There should be one list for each entry in the list you made in step 1. For instance, you could create a list of Sales personnel, a list of Research personnel, etc.
  4. List by list, select the lists you created in step 3. Give each list a single-word name that matches the names used in the list in step 1, i.e., Sales, Research, Executive, etc.
  5. Switch to the worksheet where you want to have the drop-down lists appear.
  6. Select the cells where users should be able to enter items from your first list—the one created in step 1.
  7. Display the Data tab of the ribbon.
  8. Click the Data Validation option in the Data Tools group. Excel displays the Data Validation dialog box. (See Figure 1.)
  9. Figure 1. The Data Validation dialog box.

  10. Using the Allow drop-down list, choose List.
  11. In the Source box, enter an equal sign followed by the name you created in step 2. For instance, =Departments.
  12. Click OK. You have now specified that only information from your first list can be entered into the cells you selected in step 6.
  13. Select the cells where users should be able to enter items from the dependent lists. For instance, select the cells just to the right of the cells you selected in step 6.
  14. Display the Data tab of the ribbon.
  15. Click the Data Validation option in the Data Tools group. Excel again displays the Data Validation dialog box.
  16. Using the Allow drop-down list, choose List.
  17. In the Source box, enter a formula that uses the INDIRECT function. If the first cell of the range selected in step 11 is cell B3, and you want that first cell to be dependent on what is chosen in cell A3, then you would use the following formula:
  18.      =INDIRECT(A3)
    
  19. Click OK.

That's it. Now people can only select from your major list if they are using one of the cells specified in step 6, and from the appropriate dependent lists if they choose one of the cells in step 12.

There are lots of different variations of this approach (using data validation). You can find more information on some of these approaches by visiting these Web pages:

http://www.ozgrid.com/download/ (download the MatchingLists.zip file)
http://www.contextures.com/xlDataVal02.html

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10545) applies to Microsoft Excel 2007 and 2010. You can find a version of this tip for the older menu interface of Excel here: Creating Dependent Drop-Lists.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Getting Rid of Wizards and Templates

Templates and wizards are used rather extensively in Word to either process a document or define how that document is to ...

Discover More

Median of Selected Numbers

Need to find a median value in a series of values? It's easy with the MEDIAN function. What isn't as easy is to derive ...

Discover More

Inserting the Author Name

Did you know that Word tries to keep track of who the author of a document is? This information can be easily added to ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Making a Drop-Down List Indicator Visible

Data validation allows you to create drop-down lists that aid data entry. If you want the indicator for the drop-down ...

Discover More

Prohibiting Single-Digit Entries in a Cell

The Data Validation capabilities of Excel can be very helpful when you are trying to control what people can enter into a ...

Discover More

Using Data Validation

Want to control what users put into a cell? It's easy to do using a feature called data validation, as described in this tip.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 5?

2021-08-04 08:56:44

Tim Easter

Thank you, David Czuba, for taking the time to be more precise than I did with my comment. As you correctly said, data validation can only use a named range, not a table. However, you can use a structured reference to the applicable data portion of a table in your data validation so that when additional information is added to the table the named range automatically expands to include it.

In the URL given, the one-column table is named "Region", but the data portion of the table (the column of information minus the header) is named "Regionn" (note the second n), using the structured reference =Region[Region] (i.e. the column of data with the header Region in the table named Region). The data validation cells read this named range "Regionn", effectively reading whatever data is in that column of the table. If an additional column is added to this table, the named range "Regionn" will still only refer to the column with the header Region. But if more entries are added to the Region column of the table the named range "Regionn" will automatically expand to include them, thus being available in the data validation dropdown list.

To apply this to dependent dropdown lists, the named range (in the URL example, "Regionn") would have to match the entries in the initial dropdown list (e.g. "Sale", "Research", Executive" in the example given in step 4 above in the article).


2021-08-02 16:46:27

David Czuba

Thank you, Tim Easter. Just to clarify, table names cannot be used DIRECTLY as data validation lists. What is being used is a structured reference, which of course is also known as a named range. Tables 'support' structured references, which allows the INDIRECT formula to work with the table's data values. The example in the URL appears to use the column headers of the named range, however, it is the table name being used! As a test, the data validation list isn't affected if the table's column header is renamed, but it does if the table is renamed. If a second column is added to the table, the resulting data validation list includes these items in the drop-down, suggesting that the table is also stored as an array internally. I imagine the Microsoft software engineers had to compromise when supporting structured references in tables!


2021-08-02 07:50:42

Tim Easter

To make this even more useful, use tables in your data validation lists rather than named ranges. Then you can add to your lists later as needed without having to change formulas or range names (except for the primary list, which will require adding another table for the new entry).
https://sparrowsolutions.ca/datavalidationlists/


2014-03-07 04:18:59

NITIN

Thanks Bryan, I will LookUp that & Try..


2014-03-04 11:42:50

Bryan

INDEX/MATCH allows you to use tba data in one cell to look up information in a table and display it in another cell.


2014-02-28 03:06:07

Nitin

Thanks Bryan Got it & I understand your stand for not providing step-by-step instructions for free.

& Yes What you mention is exactly the same - I have only one record per name / id - not multiple order details....
You mentioned I can do it without VBA - ??? I did not understand that - do you mean there is a function to do that ?


2014-02-27 11:43:22

Bryan

As long as there is only one record per name it would be easy to use the above functions. No VBA needed. If you have multiple records attached to each name/ID in the drop down (like a customer order table -- each customer could have multiple orders) it is more complicated but the solution depend entirely on your data.

You should have to trouble finding a solution online. Off the top of my head, Chandoo.org is a good place to start. I don't want to give step by step instructions for free, especially when according to the comment policy I wouldn't what I wrote.


2014-02-27 06:41:01

Nitin

Thanks Bryan,
What I want is:

From a dropdown list in say a5, I will select a name.

Once I select the name, I would want the birthdate, spouse name, address & other data / information of THAT person to be displayed in subsequent columns designated for each piece of information.

I also intend to use the same concept for invoicing:
wherein I will select the customer id from a drop down list & on selection, automatically, the address, tax no., email id, concerned person's name etc will be filled up in the designated cells.

I would appreciate if you can give me a step by step explanation (if possible) as I am novice in macro / excel functions...

Meanwhile, I shall study the VLOOKUP & INDEX/MATCH functions.


2014-02-26 11:44:06

Bryan

Nitin, do you you want to see a whole list displayed or just one matching record? If the latter, you could simply use a VLOOKUP or an INDEX/MATCH combination.


2014-02-26 07:15:09

Nitin

Is there a way of dependant lists getting selected automatically on selection of the main list?
I mean in a drop down list (at a5), if i select a name, then a6 should display the relative details of the name - say telephone no. (from another list) & a7 should display the spouse name & a8 should display the address etc etc etc


2014-02-25 13:34:48

Bruce

Daniel. After entering the information into the cells (A2:A10 for example) highlight these cells and change the name to something relevant (like dependants) this creates the "named range" then use this name in your validation


2014-02-25 10:03:03

Daniel

I found my answer here: http://www.contextures.com/xlDataVal02.html


2014-02-25 09:56:58

Daniel

Is there some special way to create a list? When I get to step 11, I receive an error that says "A named range you specified cannot be found."


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.