When you need to verify data that can go in a cell, Data validation is the function in Excel to use.
For example, to enter grades for students you may want to enter only A, B, C, D, and F. To see how to accomplish this in excel, enter data below
Now select Grade Column, and Go to Data -> Data Validation
Enter values as below
Now try to enter different values in Grades and see how Excel reacts.
You have different options while setting validation
- Restrict only whole number (Such as for Student role number).
- Provide a list (List of grades).
- Restrict number of character to enter (For example SSN will always be 9 digit).
- Or you can provide a custom formula.
You also have the option of setting hard error, soft warning or just information.