Nov 5, 2016

Drop-down List in MS Excel


Drop-down lists in Excel are helpful if you want to be sure that users select an item from a list, instead of typing their own values.






1. On the second sheet, type the items you want to appear in the drop-down list.


2. On the first sheet, select cell B1.


3. On the Data tab, click Data Validation.


The 'Data Validation' dialog box appears.

4. In the Allow box, click List.
5. Click in the Source box and select the range A1:A3 on Sheet2.


6. Click OK.

Result:


Tip: If you don't want users to access the items on Sheet2, you can hide Sheet2. To achieve this, right click on the sheet tab of Sheet2 and click on Hide.





7. You can also type the items directly into the text box, without using Sheet2. This gives the exact same result.

 

Dependent Drop-down Lists

This example describes how to create dependent drop-down lists in Excel. Here's what we are trying to achieve:

The user selects Pizza from a drop-down list.


As a result, a second drop-down list contains the Pizza items.


To create these dependent drop-down lists, execute the following steps.

1. On the second sheet, create the following named ranges.

Name Range Address
Food A1:A3
Pizza B1:B4
Pancakes C1:C2
Chinese D1:D3



2. On the first sheet, select cell B1.
3. On the Data tab, click Data Validation.


The 'Data Validation' dialog box appears.

4. In the Allow box, click List.
5. Click in the Source box and type =Food.


6. Click OK.

Result:


7. Next, select cell E1.
8. In the Allow box, click List.
9. Click in the Source box and type =INDIRECT($B$1).


10. Click OK.

Result:


Explanation: the INDIRECT function returns the reference specified by a text string. For example, the user selects Chinese from the first drop-down list. =INDIRECT($B$1) returns the Chinese reference. As a result, the second drop-down lists contains the Chinese items.

Post a Comment

 
TECH SUPPORT © 2012 - Designed by INFOSBIRD