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

by Allen Wyatt
(last updated October 5, 2015)

10

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

Understanding Lists

What is a list of data, and how do you create one? Here are some guidelines you may find helpful.

Discover More

Displaying ScreenTips

ScreenTips are those small, yellow boxes that appear when you hover over different objects in Word. You have complete control ...

Discover More

Changing Huge Numbers of Hyperlinks

Need to change the various targets of a group of hyperlinks? Getting at the underlying link can seem challenging, but it is ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Ensuring Unique Values in a Column

If you want to make sure that only unique values are entered in a particular column, you can use the data validation ...

Discover More

Answering Questions in Order

It is not unusual to use Excel to gather the answers to users' questions. If you want your users to answer your questions in ...

Discover More

Handling Validation for Proper Latitude

When setting up Excel for data entry, you often have to be concerned with what values are acceptable. For example, if users ...

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}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 8Mpixels. 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 6 - 4?

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.