Excel.Tips.Net ExcelTips (Menu Interface)

Limiting Choices in a Cell

Summary: Want to limit what a person can enter into a particular cell? You can use Excel's data validation feature to help enforce what people enter. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, and Excel 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Limiting Choices in a Cell.)

When you are developing worksheets that will be used by others, you may want to limit what your users can enter into a particular cell. For instance, you might have a cell where the user should enter their department. You would obviously want them to only enter one of the valid departments for your company.

To ensure that only certain departments can be entered in the cell, follow these steps:

  1. Select the cell where the user will input the department name.
  2. Choose Validation from the Data menu. Excel displays the Data Validation dialog box.
  3. The Settings tab should be displayed. (Click here to see a related figure.)
  4. Using the Allow drop-down list, choose List.
  5. In the Source box, enter your department names, separated by commas.
  6. Display the Error Alert tab. On this tab you specify an error message that the user will see if they enter an improper department name. (Click here to see a related figure.)
  7. In the Title field, enter the phrase "Enter Valid Department Name".
  8. In the Error message box, enter a message that indicates what the user did incorrectly. You should also indicate the acceptable department names.
  9. Click OK.

That's it. Now, the user can only enter one of your valid department names. Better yet, when they select the cell they will see a drop-down arrow at the right of the cell where they can select from the department names you specified in step 5. If they enter one that is incorrect, they will see the error message and will need to change what they entered.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2943) applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003

You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Limiting Choices in a Cell.

Related Tips:

Tame Your Data! ExcelTips: Filters and Filtering provides all the details necessary to let you manage large sets of data with confidence and ease. Its information-packed pages demonstrate how to use the two types of filters provided by Excel: AutoFilters and advanced filters. Check out ExcelTips: Filters and Filtering today!