Data Validation

Data Validation restricts the type of data that can be entered into a cell, helping prevent typos and inconsistent entries before they happen.

Setting Up a Dropdown List

Data tab -> Data Validation -> Allow: List -> Source: Noida,Delhi,Gurugram

This turns the cell into a dropdown, letting users pick only from the specified options instead of typing free text.

Restricting Number Ranges

Allow: Whole Number -> Data: between -> Minimum: 0, Maximum: 100

Useful for fields like percentages or scores, where any value outside a valid range should be blocked.

Custom Validation with a Formula

Allow: Custom -> Formula: =AND(LEN(A2)=10, ISNUMBER(A2))

Custom formulas make it possible to enforce more specific rules, such as requiring a phone number to contain exactly 10 digits.

Input Messages and Error Alerts

The Input Message tab can show a helpful tooltip when a cell is selected, and the Error Alert tab can block or warn on invalid entries with a custom message.

Data validation doesn't clean up existing bad data - it prevents new bad data from being entered, which is why it's most effective when set up before data collection begins.

Ready to Master Data Science?

Join Uncodemy's Data Science Course and build real, job-ready skills with expert mentors.

Explore Course