Using data validation
Data validation helps you control what data you and your collaborators enter in your spreadsheets. Here's what you can do with data validation:
- Validate numbers, dates, and text.
- Prevent users from entering text that doesn't match your criteria, or show them a comment on the cell when the data doesn't match the validation rule.
- Add text to the cells you add validation to, to help your collaborators enter the right type of data.
Note: Data validation doesn't support boolean operators.
Follow these steps to start using data validation:
- Go to Data and select Validation. Alternatively, you can right-click the range of cells and select Validate data.
- Highlight cells to select a range you want to apply data validation to.
- Select your validation criteria. A help tip is generated as you type.
You can edit the help text manually, but if you update your validation criteria after editing the help text, the tip won't get automatically updated. Use the Reset link that appears when you edit the help text to make sure the text gets automatically generated.
- Check the box next to "Allow invalid data, but show warning" if you want to allow collaborators to be able to enter invalid data. They'll see a warning whenever the data doesn't match the criteria.
- Click Save, and you're done.
To remove data validation, simply select the range of cells and click Remove validation. If you'd like to remove validation from the entire worksheet, select the whole sheet by clicking the upper left corner of the sheet. Then, select Data > Validation, and click the Remove validation button.
A few things to keep in mind:
- If data validation is applied to cells containing data, rules won't be applied until the data is modified.
- Collaborators can change validation rules.
- Cells with data validation are skipped in List view and spreadsheets populated by a form.
- When you import an .xls file containing data validation into Google Spreadsheets, validation rules will be ignored.
Similarly, when exporting a Google Spreadsheets file into an .xls or .ods, validation rules won't be exported.
Docs