If you type the list on a different worksheet from the data entry cell, define a name for the list.
- Select the cell, range of cells, or nonadjacent selections that you want to name.
- Click the Name box at the left end of the formula bar
.
Name box
- Type the name for the cells.
- Press ENTER.
Note You cannot name a cell while you are changing the contents of the cell.
If you type the list in a different workbook, define a name with an external reference to the list.
- Open the workbook that contains the list of dropdown entries.
- Open the workbook where you want to validate cells, point to Name on the Insert menu, and then click Define.
- In the Names in workbook box, type the name.
- In the Refers to box, delete the contents, and keep the insertion pointer in the box.
- On the Window menu, click the name of the workbook that contains the list of dropdown entries, and then click the worksheet that contains the list.
- Select the cells containing the list.
- In the Define Name dialog box, click Add, and then click Close.
If the list is elsewhere, enter the name you defined for your list in the Source box.
Make sure the reference or name is preceded with an equal sign (=).
-
Click the Error Alert tab, and make sure the Show error alert after invalid data is entered check box is selected.
-
Select one of the following options for the Style box:
To display an information message that does not prevent entry of invalid data, click Information.
To display a warning message that does not prevent entry of invalid data, click Warning.
To prevent entry of invalid data, click Stop.
-
Fill in the title and text for the message (up to 225 characters).
Note If you don't enter a title or text, the title defaults to " Microsoft Excel" and the message to: "The value you entered is not valid. A user has restricted values that can be entered into this cell."
Note Applying data validation to a cell does not format the cell.
If the entry list is short, you can type the entries directly in the Source box, separated by the Microsoft Windows list separator character (commas by default). For example, you could type Low, Average, High in the Source box instead of entering the three words on a worksheet.