Excel - Validating existing data

Excel has a data validation tool. However, that only works during data entry stage. It cannot validate existing data.

Learn how to use Excel data validation tool on data entry

Here we tell you a method about how to validate existing data.

Below are scores of students in a class. The score should be between 0 and 100. However, the teacher made mistakes with the scores of David and Emily, which is below 0 and above 100 respectively.


Of course, if there are only 5 cases, you can check it manually. However, if there are large number of records, manual inspection is inefficient. You can write a simple formula to do the data validation.

Write a formula like this:

=IF(AND(B2>=0,B2<=100),"correct","wrong")

Two functions are used in this formula. The first function is the AND function. It combines the two logical tests: score >=0 and score <=100. A valid score has to meet both criteria to be valid. Then we used the IF function. If the condition is met, it returns "correct". Otherwise, it returns "wrong". Then you just need to change all the scores where the message is "wrong".


Comments

Popular posts from this blog

Excel - Solver examples

Excel - Pivot Table

Excel - INDEX function