Question

I have two sheets set up in excel...on of the sheets is a list of contacts and the other sheets is a list of food items.

On the food item sheet a user can pull down a list of contacts to associate it with that food item.

This is all working fine, but the problem is, the user can put in a value that is not on that list by typing.

Is there a way to only allow values in the drop down list?

Was it helpful?

Solution

To create a drop-down list from a range of cells, use the Validation command under the Data menu.

1. To create a list of valid entries for the drop-down list, type the entries in a single column or row without blank cells. For example:

enter image description here

2. NOTE You may want to sort the data in the order that you want it to appear in the drop-down list.

3. If you want to use another worksheet or another workbook, do one of the following: Use a different worksheet in the same workbook Type the list on that worksheet, and then define a name for the list.

Use a different worksheet in a different workbook Type the list on that worksheet, and then define a name with an external reference to the list.

1. Select the cell where you want the drop-down list.

2. On the Data menu, click Validation, and then click the Settings tab. In the Allow box, click List.

3. To specify the location of the list of valid entries, do one of the following:

4. If the list is in the current worksheet, enter a reference to your list in the Source box.

5. If the list is on a different worksheet in the same workbook or a different workbook, enter the name that you defined for your list in the Source box.

6. In both cases, make sure that the reference or name is preceded with an equal sign (=). For example, enter =ValidDepts.

Make sure that the In-cell drop-down check box is selected.

7. To specify whether the cell can be left blank, select or clear the Ignore blank check box.

Optionally, display an input message when the cell is clicked.

And then you will get something like::

enter image description here

and if you try to add some other value then the list ,you will get a message like this::

enter image description here

OTHER TIPS

You can use the data validation button and then there is an option under settings you can select the list option from the allow box and then select your source information (from a list you have placed in some cells elsewhere in the workbook). Then it will give an error if a value is typed that is not in the list.

Under the error alert tab you can even put a custom message that shows up for an invalid value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top