MS Excel

How to work with drop down lists in MS Excel


Have you ever wanted to create a drop down list in Excel to avoid data entry errors or to make the data entry process easier?

In this post I’ll cover a whole range of tips on how to work with drop down lists in Excel including:

Excel has a feature called Data Validation that you can use to make sure the users of your spreadsheets enter certain values in the cells. The lists (or drop down lists) are a type of data validation used to make sure the users enter a value from a set of options.

How to create/modify drop down lists

To create/modify a drop down list:

  • Select the cell(s) where you want to create/modify the drop down list
  • Go to the Data tab and click on the data validation button

In the Data Validation dialog box click in the validation criteria selection button and select ‘List’:

If you’re modifying an existing list, the validation criteria type will be preselected with the existing type.

  • Enter the source for the list:
    1. The source can be entered manually, using commas to separate the options:

or it can be entered by selecting a range that contains the options you want in your list.

Create lists using information from other worksheets

If you’re using Excel 2007 or later you can create a drop down from a source range that is located in another worksheet.

To create a list from a range in another worksheet, in the Data Validation dialog box press the range selection button ,  and go to the desired range in the other worksheet.

How to remove drop down lists

  • Select the cell(s) where you want to create/modify the drop down list
  • Go to the Data tab and click on the data validation button
  • Click on Clear All

How to copy lists from one cell to another

  • Select a cell that contains the drop down list you want to copy
  • Copy the cell by pressing Ctrl + C or Right-click -> Copy
  • Select the cells where you want to paste the drop down list
  • Right-click, select paste special, click on Validation and press OK.

Note: You can also do a regular Copy/Paste operation to paste the list. However, if you copy a cell with a value or formula they will be pasted along the drop down.

How to deal with a workbook with multiple different lists

When creating a workbook with multiple different list one of the recommended approaches is to create a worksheet specifically for all the list sources. For example, you can create a worksheet called ‘List Sources’ and place there all the sources for your lists.

In addition, is a good practice to name the lists so you can easily refer to them using their name. To name a list, select the range that contains the list elements and enter the corresponding name in the name box.

Then you can use the names of the lists in the Data Validation dialog box

To help the users of your worksheets you can display a tooltip when they select the cells that contain a drop down list or any other type of data validation.

Once you’re in the data validation dialog box, click on the Input Message and enter the title and message you want to display.

The tooltip will look like this

To show a message when the user enters a wrong value in the cell:

Go to the Error Alert tab within the Data Validation dialog box
Enter the title and error message you want to display

The error message will look like this:

Create an expandable drop down list

If you work with lists that constantly need to be updated and every time you add a new value to the list you need to go the Data Validation dialog box and select the new range, there’s a workaround to make your life easier.

The trick is very simple, just convert the list source to a table and you’ll be good to go. Here are the steps:

1) Select the range that contains the source for the list

2) Convert the source range to a table: Go to Insert tab, click on Table and then click OK.

A faster way of create tables is to select the desired range and press Ctrl + T, then press Enter.

3)  Create the drop down list and use as a source the table you just created.

And that’s all!

See below how the drop down list automatically captures new values when you add them below the list.


Create dependent drop down lists

Another thing you can do is to limit the choices in a drop down list based on the selections of another list. For example, if you select ‘beverages’ in column A, then only beverages appear in column B; but if you select ‘Dairy’ in column A then only dairy products appear in column B. See example below:

1) The first step is to create a named range for each option of the main list.

For example, if the main list is composed by Beverages, Dairy, Bakery, and Frozen, then you should create a named range for each option.

Notice that each list MUST be named exactly as the corresponding option in the main list.

2) Then create the drop down for the main list

3) Then create the drop down for the sublist using the INDIRECT function

Type =INDIRECT(<Address of cell with main list>)

In the following example the main list is in cell A5, therefore you have to go to the cell B5 and create the drop down list using =INDIRECT(A5) as the source. See example below:

 

If you liked this or know someone who could use it please click the buttons at the top to share it with your friends on Facebook, Twitter, and LinkedIn

Newsletter

Stay up to date with our latest news, receive exclusive deals, and more.

© Master Data Analysis All Rights Reserved 2024

Orlando Mezquita

Love helping out people to get better using data analysis tools! My day job is statistician for a Pharmaceutical Company.

View Comments

  • I have one that I've been working on for a Little. I have all my calculations and formless throughout the mainsheet. I have separate worksheets for each one in 2 different workbooks. I have one droplet down list that drinks the second drop down list on different options. What I'm trying to achieve is that drop down list one tilsit wich workbook to go to? And then drop down number 2 to sit wit sheet to copy. To the main control workbook. I was reading through this website and it seems like you have a good understanding so I was looking for a few pointers. the drop down list works find. Just need to be able to make it where my selections will copy or pull data over from other sheets, column and row. They are bunched together. These cells hold math calculations.

  • Hi, nice article
    If you don't mind, can you tell me how to create a excel GIF file and post it into a webpage as you did.

    Narendra

    • Hi Narendra,

      Thanks!

      I use a program called Camtasia to create the GIFs and upload it to the website as you would upload any other image. Please let me know if you need other details.

Share
Published by
Orlando Mezquita

Recent Posts

18 courses to learn R in 2018

Do you want to learn or get better at R programming?  If yes, you will…

7 years ago

Calculating the median in Excel PivotTables

Go to Master Data Analysis Yes, you read the title of this post correctly, you…

7 years ago

Using R to predict if a customer will buy

In this post, I’ll show how to create a simple model to predict if a…

8 years ago

Data Science for Beginners

Are you wondering what's all this buzz about data science? The following videos will give…

8 years ago

Import excel files with a dynamic starting row

Go to Master Data Analysis This is the 4th post of a series that covers…

8 years ago

Import specific cells from Excel files

Go to Master Data Analysis This is the 5th post of a series that covers…

8 years ago