How do I add options to a drop down list in Excel?

A drop-down list is an excellent way to give the user an option to select from apre-defined list.

It can be used while getting a user to fill a form,or while creating interactive Excel dashboards.

Drop-down lists are quite common on websites/apps and are very intuitive for the user.

Watch Video Creating a Drop Down List in Excel

In this tutorial, youll learn how to create a drop down list in Excel [it takes only a few seconds to do this] along with all the awesome stuff you can do with it.

In this section, you will learn the exacts steps to create an Excel drop-down list:

  1. Using Data from Cells.
  2. Entering Data Manually.
  3. Using the OFFSET formula.

#1 Using Data from Cells

Lets say you have a list of itemsas shown below:

Here are the steps to create an Excel Drop Down List:

  1. Select a cell where you want to create the drop down list.
  2. Go to Data > Data Tools > Data Validation.
  3. In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria.
    • As soon as you select List, the source field appears.
  4. In the source field, enter=$A$2:$A$6, or simply click in the Source field and select the cells using the mouse and click OK. This will insert a drop down list in cell C2.
    • Make sure that the In-cell dropdown option is checked [which is checked by default]. If this option in unchecked, the cell does not show a drop down, however, you can manually enter the values in the list.

Note: If you want to create drop down lists in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute [such as $A$2] and not relative [such asA2, or A$2, or $A2].

#2 By Entering Data Manually

In the above example, cell references are used in the Source field. You can also add items directly by entering it manually in the source field.

For example, lets say you want to show two options, Yes and No, in the drop down in a cell. Here is how you can directly enter it in the data validation source field:

  • Select a cell where you wantto create the drop down list [cell C2 in this example].
  • Go to Data > Data Tools > Data Validation.
  • In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria.
    • As soon as you select List, the source field appears.
  • In the source field, enter Yes, No
    • Make sure that the In-cell dropdown option is checked.
  • Click OK.

This will create a drop-down list in the selected cell. All the items listed in the source field, separated by a comma, are listed in different lines in the drop down menu.

All the itemsenteredin the source field, separated by a comma, are displayed in different lines in the drop down list.

Note: If you want to create drop down lists in multiple cells at one go, select all the cells where you want to create it and then follow the above steps.

#3 Using Excel Formulas

Apart from selecting from cells and entering data manually, you can also use a formula in the source field to create an Excel drop down list.

Any formula that returns a list of values can be used to create a drop-down list in Excel.

For example, suppose you have the data set as shown below:

Here are the steps to create an Excel drop down list using the OFFSET function:

  • Select a cell where you want to create the drop down list [cell C2 in this example].
  • Go to Data > Data Tools > Data Validation.
  • In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria.
    • As soon as you select List, the source field appears.
  • In the Source field, enter the following formula: =OFFSET[$A$2,0,0,5]
    • Make sure that the In-cell dropdown option is checked.
  • Click OK.

This will create a drop-down list that lists all the fruit names [as shown below].

Note: If you want to create a drop-down list in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute [such as $A$2] and not relative [such asA2, or A$2, or $A2].

How this formula Works??

In the above case, we used an OFFSET function to create the drop down list. It returns a list of items from the ra

It returns a list of items from the range A2:A6.

Here is the syntax of the OFFSET function: =OFFSET[reference, rows, cols, [height], [width]]

It takes five arguments, where we specified the reference as A2 [the starting point of the list]. Rows/Cols are specified as 0 as we dont want to offset the reference cell. Height is specified as 5 as there are five elements in the list.

Now, when you use this formula, it returns an arraythat has the list of the five fruits in A2:A6.Note that if you enter the formula in a cell, select it and press F9, you would see that it returns an array of the fruit names.

Creating a Dynamic Drop Down List in Excel [Using OFFSET]

The above technique of using a formula to create a drop down list can be extended to create a dynamic drop down list as well. If you use the OFFSET function, as shown above, even if you add more items to the list, the drop down would not update automatically. You will have to manually update it each time you change the list.

Here is a way to make it dynamic [and its nothing but a minor tweak in the formula]:

  • Select a cell where you want to create the drop down list [cell C2 in this example].
  • Go to Data > Data Tools > Data Validation.
  • In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria. As soon as you select List, the source field appears.
  • In the source field, enter the following formula: =OFFSET[$A$2,0,0,COUNTIF[$A$2:$A$100,]]
  • Make sure that the In-cell drop down option is checked.
  • Click OK.

In this formula, Ihave replaced the argument 5 with COUNTIF[$A$2:$A$100,].

The COUNTIF function counts the non-blank cells in the range A2:A100.Hence, the OFFSET functionadjusts itself to include all the non-blank cells.

Note:

  • For this to work, there must NOT be any blank cells in between the cells that are filled.
  • If you want to create a drop-down list in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute [such as $A$2] and not relative [such asA2, or A$2, or $A2].

Copy Pasting Drop-Down Lists in Excel

You can copy paste the cells with data validation to other cells, and it will copy the data validation as well.

For example, if you have a drop-down list in cell C2, and you want to apply it to C3:C6 as well, simply copy the cell C2 and paste it in C3:C6. This will copy the drop-down list and make it available in C3:C6 [along with the drop down, it will also copy the formatting].

If you only want to copy the drop down and not the formatting, here are the steps:

  • Copy the cell that has the drop down.
  • Select the cells where you want to copy the drop down.
  • Go to Home > Paste > Paste Special.
  • In the Paste Special dialogue box, select Validation in Paste options.
  • Click OK.

This will only copy the drop down and not the formatting of the copied cell.

Caution while Working with ExcelDrop Down List

You need to to be careful when you are working with drop down lists in Excel.

When you copy a cell [that does not contain a drop down list] over a cell that contains a drop down list, the drop down list is lost.

The worst part of this is that Excel will not show any alert or prompt to let the user know that a drop down will be overwritten.

How to Select All Cells that have a Drop Down List in it

Sometimes, it s hard to know which cells contain the drop down list.

Hence, it makes sense to mark these cells by either giving it a distinct border or a background color.

Instead of manually checking all the cells, there is a quick way to select all the cells that have drop-down lists [or any data validation rule] in it.

  • Go to Home > Find & Select > Go To Special.
  • In the Go To Special dialogue box, select Data Validation
    • Data validation has two options: All and Same. All would select all the cells that have a data validation rule applied on it. Same would select only those cells that have the same data validation rule as that of the active cell.
  • Click OK.

This would instantly select all the cells that have a data validation rule applied to it [this includes drop down lists as well].

Now you can simply format the cells [give a border or a background color] so that visually visible and you dont accidentally copy another cell on it.

Here is another technique by Jon Acampora you can use to alwayskeep the drop down arrow icon visible. You can also see some ways to do this in this video by Mr. Excel.

Creating a Dependent / Conditional Excel Drop Down List

Here is a video on how to create a dependent drop-down list in Excel.

If you prefer reading over watching a video, keep reading.

Sometimes, you may have more than one drop-down list andyou want the items displayed in the second drop down to be dependent on what the user selected in the first drop-down.

These are called dependent or conditional drop down lists.

Below is an example of a conditional/dependent drop down list:

In the above example, when the items listed in Drop Down 2 are dependent on the selection made in Drop Down 1.

Now lets see how to create this.

Here are the steps to create a dependent / conditional drop down list in Excel:

  • Select the cell where you want the first [main] drop down list.
  • Go to Data > Data Validation. This will open the data validation dialog box.
  • In the data validation dialog box, within the settings tab, select List.
  • In Source field, specify the range that contains the items that are to be shown in the first drop down list.
  • Click OK. This will create the Drop Down 1.
  • Select the entire data set [A1:B6 in this example].
  • Go to Formulas > Defined Names > Create from Selection [or you can use the keyboard shortcut Control + Shift + F3].
  • In the Create Named from Selection dialog box, check the Top row option and uncheckall the others. Doing this creates 2 names ranges [Fruits and Vegetables]. Fruits named range refers to all the fruits in the list and Vegetables named range refers to all the vegetables in the list.
  • Click OK.
  • Select the cell where you want the Dependent/Conditional Drop Down list [E3 in this example].
  • Go to Data > Data Validation.
  • In the Data Validation dialog box, within the setting tab, make sure List in selected.
  • In the Source field, enter the formula =INDIRECT[D3]. Here, D3 is the cell that contains the main drop down.
  • Click OK.

Now, when you make the selection in Drop Down 1, the options listed in Drop Down List 2 would automatically update.

Download the Example File

How does this work? The conditional drop down list [in cell E3] refers to =INDIRECT[D3]. This means thatwhen you select Fruits in cell D3, the drop down list in E3 refers to the named range Fruits [through the INDIRECT function] and hence lists all the items in that category.

Important Note While Working with Conditional Drop Down Lists in Excel:

  • When you have made the selection, and then you change the parent drop down, the dependent drop down would not change and would, therefore, be a wrong entry. For example, if you select the US as the country and then select Florida as the state, and then go back and change the country to India, the state would remain as Florida. Here is a great tutorial by Debra on clearing dependent [conditional] drop down lists in Excel when the selection is changed.
  • If the main category is more than one word [for example, Seasonal Fruits instead of Fruits], then you need to use the formula=INDIRECT[SUBSTITUTE[D3, ,_]], instead of the simple INDIRECT function shown above. The reason for this is that Excel does not allow spaces in named ranges. So when you create a named range using more than one word, Excel automatically inserts an underscore in between words. So Seasonal Fruits named range would be Seasonal_Fruits. Using the SUBSTITUTE function within the INDIRECT function makes sure that spacesare converted into underscores.

You May Also Like the Following Excel Tutorials:

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Video liên quan

Chủ Đề