Sunday, April 17, 2011

Manually creating a drop down list

In the previous post we saw how we can get a drop down list to chose our data from. Though this serves the basic purpose, it does not provide any kind of validation and the user can enter whatever she likes. The solution to this problem is creating drop down list which forces the user to select a value from the available options. In this post I am describing how to manually create a Static drop down list.

Sample Problem: user wants to assign cities to the sales people and wants to make sure that the city is selected from a given list only.

Solution:
STEP 1: Select the cell for which you want to create the drop down list and then move to Data tab in the Ribbon. And then click on Data Validation in Data Tool section. A window as shown in the below figure will come up. Select 'List' option in the drop down.



STEP 2: Provide a comma separated list of the cities which you want to use in your data sheet and click on OK.
STEP 3: Check that the selected cell in STEP 1 has an option to select the city name from a drop down list as shown in the below figure.



STEP 4: You can apply this drop down to all other cell in the column by dragging.
STEP 5: Try typing a city name which is not present in the drop down list and then hit ENTER. An error message as shown in the below figure will be shown.

No comments:

Post a Comment