Tutorials - 2026-05-12
Data Validation in Excel: Complete Guide
Use data validation in Excel to create drop-down lists, restrict dates and numbers, prevent invalid entries, and protect spreadsheet quality.
What Data Validation Does
- Data validation controls what users can enter in a cell. It helps prevent typos, inconsistent labels, invalid dates, and numbers outside an allowed range. Use data validation for: Drop-down lists Valid dates Whole numbers Decimal ranges Text length limits Custom formula rules
Create a Drop-Down List
- Select the input cells, then go to: Data -> Data Validation -> Allow: List Enter values separated by commas: \\\ Open,Closed,Pending \\\ For larger lists, reference a range instead of typing values manually.
Restrict Dates
- To allow only dates after today: Data Validation -> Allow: Date -> greater than -> =TODAY() This is useful for scheduling, deadlines, bookings, and follow-up dates.
Restrict Numbers
- To allow only values between 1 and 100: Data Validation -> Allow: Whole number -> between -> 1 and 100 Use this for scores, ratings, quantities, and percentages.
Use a Custom Formula
- Custom formulas give you more control. To prevent duplicates in A2:A100: \\\ =COUNTIF($A$2:$A$100,A2)=1 \\\ Apply the rule to the full range.
Add Input and Error Messages
- Use an input message to guide users before they type. Use an error alert to explain what went wrong. Clear messages reduce spreadsheet mistakes and make shared workbooks easier to use.
Related Guides
- How to Create a Drop-Down List in Excel COUNTIF function TODAY function Excel Tables Benefits
Data Validation Rule Examples
- Goal Validation type Choose from approved statuses List Date cannot be in the past Date or custom formula Score must be 1 to 100 Whole number Prevent duplicate IDs Custom formula with COUNTIF Limit comment length Text length
Expert Workbook Design
- Data validation works best when it supports a clear input model. Keep input cells visually distinct, use drop-downs for repeated categories, and add input messages for fields that users often misunderstand. For shared templates, combine validation with protected formula cells. Users should be able to edit inputs without accidentally breaking calculations.
Related Guides
- Use How to Create a Drop-Down List in Excel, COUNTIF, TODAY, and Lock Cells in Excel to build stronger input sheets.
Circle invalid data workflow
- Select input range → Data Validation rules → Data tab → Data Validation dropdown → Circle Invalid Data before sending templates to users.
Frequently asked questions
- What is data validation in Excel? Data validation restricts what users can enter in a cell, such as list values, dates, numbers, text length, or custom formula conditions.
- Can data validation prevent duplicates? Yes. Use a custom formula such as =COUNTIF($A$2:$A$100,A2)=1 on the entry range.
- Can data validation force users to choose from a list? Yes. Use Data Validation with Allow set to List and point it to a typed list or source range.
- Can users paste invalid values over data validation? In some workflows, pasting can bypass expected input behavior. Protect sheets and audit pasted data when validation is business-critical.