You can use data validation to restrict the data that is entered in cells to a specific condition that you set. For example, if you want to restrict a numeric cell, you could add numeric constraints like the number should be less than 20, or between 40 and 60.
Similarly, you can use data validation to set rules on cells with text and date formats. You could also restrict a cell to a predefined list of values and bring up a drop-down list of allowed values when the cell is edited.
This section will guide you to restrict a cell to a predefined list of values.
To restrict a cell:
This section describes how you can add an alert message to choose how the spreadsheet should respond when you give an invalid input. You can also add help messages to help the person editing the spreadsheet know what kind of input is accepted.
To add error message:
Stop prevents users from entering invalid data in a cell. While Information is used to inform users that the data entered is invalid and does not prevent users from entering it.
Note: You can customize the text that users see in an error alert message. If you choose not to do so, users see a default message.
To add help message:
The help text is generally used to guide the users to enter correct type of data. It will be shown when a user clicks on a particular cell.
The manage validation functionality lists all the Data Validation rules on your spreadsheet in a single view.
To manage data validation settings: