Excel - Data Validation

Excel has a convenient tool preventing you entering wrong values. It is called "Data validation". The name is somewhat misleading since what it actually does is data entry validation. If you already have a data with some wrong values in it, this "Data validation" tool cannot help you.

Learn how to validate existing data

Suppose you are a teacher and want to enter scores for each student. There are two columns. Column 1 is student name and column 2 is score.


1. Highlight the score column, since it is the column we want to do data entry validation.

2. Click on the Data tab and then choose "Data Validation" in the Data Tools group.

3. An option box pops up.


4. We want the score to be a whole number and the value is between 0 and 100.


5. You can ignore the "Input Message" options since we do not quite need them. Go to the "Error Alert" tab and enter a Title and Message that make sense to you. And click OK.


6. Check your data entry validation rules. For the first 3 records, the score are between 0 and 100. I did not get any alert. For the 4th record, I enter a value of 104 on purpose. As soon as I press the enter button, an error message pops up. If you click "Retry", it will retain the wrong value you just entered and let you revise it. If you click "Cancel", the cell will be cleared completely.



Comments

Popular posts from this blog

Excel - IF function

Excel - VLOOKUP function

Excel - Hierarchical chart (Treemap)