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. Show
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 CellsLets say you have a list of itemsas shown below: Here are the steps to create an Excel 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. 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 ManuallyIn 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:
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 FormulasApart 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:
This will create a drop-down list that lists all the fruit names (as shown below).
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):
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:
Copy Pasting Drop-Down Lists in ExcelYou 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:
This will only copy the drop down and not the formatting of the copied cell. Caution while Working with ExcelDrop Down ListYou 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 itSometimes, 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.
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 ListHere 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:
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:
You May Also Like the Following Excel Tutorials: Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster |