Home Excel Tips Sample Spreadsheets
 

Excel -- Data Validation -- Introduction

 

 

Download the zipped sample workbook

What is Data Validation?

Data validation is a tool that helps you control the kind of information that is entered in your worksheet. With data validation, you can:

--provide users with a list of choices
--restrict entries to a specific type or size
--create custom settings

Note: Data validation is not foolproof. It can be circumvented by pasting data into the cell, or by choosing Edit|Clear|ClearAll


Data Validation Dropdown
Data validation list

Provide a Drop-down List of Options

Use Data Validation to create a dropdown list of options in a cell. List items can be typed in a row or column on a worksheet, or typed directly into the Data Validation dialog box.

1. Create a List of Items

If the list of options is more than a couple of items, it will be easier to maintain if you type the list on a worksheet. The list can be entered on the sheet that will contain the dropdown lists, or on a different sheet. In this example, the list will be stored on a sheet named Lists.

  1. In single row or column, type the entries you want to see in the drop-down list. (Note: The list must be in a single block of cells -- e.g. you can use A2:A6, but not A2, A4, A6, A8.)

2. Name the List Range

If you type the items on a worksheet, and name the range, you can refer to the list from any worksheet in the same workbook.

  1. Select the cells in the list.
  2. Click in the Name box, to the left of the formula bar
  3. Type a one-word name for the list, e.g. FruitList.
  4. Press the Enter key.

Note: To create a named list that automatically expands to include new items, use a dynamic range.

 

 

 

 

 

 

 

 

Name Range


3. Apply the Data Validation
  1. Select the cells in which you want to apply data validation
  2. From the Data menu, choose Validation.
  3. From the Allow drop-down list, choose List

Allow List

 

  1. In the Source box, type an equal sign and the list name, for example: =FruitList
  2. Click OK.


List Source

Tip: To select a range name, instead of typing it:

  1. In the Data Validation dialog box, under Allow, select List
  2. Click in the Source box, and on the keyboard, press the F3 key
  3. From the Paste Name list, select a named range, and click OK.
  4. Click OK, to close the Data Validation dialog box.

 

 

 

4. Using a Delimited List

Instead of referring to a list of items on the worksheet, you can type the list in the Source box, separated by commas. For example:

Yes,No,Maybe

Note: This method of Data Validation is case sensitive -- if a user types YES, an error alert will be displayed.

 

Delimited List

5. Allow Entries that are not in the List

To allow users to type items that are not in the list., turn off the Error Alert.

Show Error

 

6. Protect the List

To protect the list from accidental damage, if you have entered it on a different worksheet, you can hide that sheet.

  1. Select the sheet that contains the list
  2. Choose Format | Sheet | Hide

Download the zipped sample workbook

 

Hide the Sheet

2. Data Validation -- Create Dependent Lists
3. Hide Previously Used Items in a Dropdown List
4. Display Messages to the User
5. Use a List from Another Workbook
6. Validation Criteria Examples
7. Custom Validation Criteria Examples
8. Data Validation Tips
9. Data Validation Documentation   
10 Data Validation -- Combo box    
11. Data Validation -- Combo Box - Named Ranges

12. Data Validation -- Display Input Messages in a Text Box
 
13. Data Validation -- Dependent Dropdowns from a Sorted List
 

 

 
   
  Home Excel Tips Sample Spreadsheets

 

 

 

Contextures contact information

Last updated: May 7, 2008 10:22 PM