Data → Data Validation restricts what can be entered in a cell: whole numbers in a range, dates, text length or values from a list.
Drop-down list
- Prepare a list of allowed values (e.g. F2:F4).
- Select the input cells → Data Validation → Allow: List → Source:
=$F$2:$F$4. - On the “Error Alert” tab set the message the user sees after an invalid entry.
Dependent drop-down lists
The second list depends on the choice in the first one. Create named ranges whose names match the values of the first list (e.g. “Fruit”, “Vegetables”) and use =INDIRECT(A2) as the source of the second list. The function turns text into a reference to a range.
In the trainer, B2:B7 has data validation — pick a department from the drop-down (arrow to the right of the cell) or type it. An invalid value will be rejected.