Preventing is better than cleaning up
Cleaning up data takes work. It’s better if mistakes never happen at all. You can set things up so that only what’s on a list can go into a cell. This is called data validation.
Then a classmate can’t type Sandwich or sandwhich. They pick sandwich from the list.
A dropdown list
-
On the
Answerssheet, select B2:B21. -
Click Data → Data validation → Add rule.
-
Under Criteria, choose Dropdown (from a range).
-
For the range, type
Survey!A2:A6(the list of snacks). -
Under Advanced options, choose Reject the input. Click Done.
Now each cell has a little arrow. When you click it, you pick an answer from the list.
In Excel: Data → Data Validation → Allow: List.
Try it
Try typing Sandwich into B3. The spreadsheet rejects it. Pick sandwich from the list.
Now that column B will only have correct answers, you don’t really need the cleanup column C anymore. But it’s fine to keep it.
Grades only from 1 to 5
-
On the
Gradessheet, select B2:B6. -
Data → Data validation → Add rule.
-
Criteria: Is between,
1and5. Reject the input. Done. -
Try typing
7. It won’t let you.
Đến lượt bạn 💪
- Answers are picked from a list.
- Only 1 to 5 can go into the grades.
- You tried typing a wrong value and the spreadsheet rejected it.
Done when: only correct data can go into the important cells.
What to take away from this lesson
- Data validation protects you from mistakes.
- A dropdown list = only allowed answers.
- Is between 1 and 5 = only grades.
- Reject the input.
© 2026 Ing. Martin Polak / AlgoRhino · Điều khoản sử dụng nội dung