Data > Data Validation (Alt, A, V, V) sets rules for what can be typed into the selected cells:
- Allow: List with a source such as
Yes,No or a range like =$G$2:$G$5 gives each cell a drop-down arrow, and refuses anything not on the list.
- Whole number, Decimal, Date and Text length take limits: between 1 and 50, a date on or after today (
=TODAY()), exactly 7 characters.
- The Input Message tab shows a note when the cell is selected; the Error Alert tab sets what happens on a wrong entry. Stop refuses it, Warning asks "Continue?", Information only tells.
Validation checks entries as they're typed. It doesn't change values already in the cells, and pasting over a validated cell replaces the rule too, so it guards data entry rather than the data itself.