How to add data validation in excel
Tutor 5 (273 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Data validation is a feature that restricts the type of data a user enters in a cell. The feature protects structure, improves accuracy, and maintains consistency across worksheets. Data validation can restrict entries to lists, numbers, dates, text length, and custom rules.
How to add data validation in Excel
To add data validation in Excel, follow the steps below for Windows and macOS.
Windows
-
Select the cell or range.
-
Go to the Data tab on the Ribbon.
-
Select Data Validation in the Data Tools group.
-
Choose a validation type from the Allow dropdown.
-
Set criteria in the Data and Value fields.
-
Add an input message in the Input Message tab when needed.
-
Add an error alert in the Error Alert tab to control the message shown when invalid data is entered.
-
Select OK.
Mac
-
Select the cell or range.
-
Open the Data menu.
-
Select Validation.
-
Choose a validation type in the Allow dropdown.
-
Adjust criteria in the Settings section.
-
Add messages in the Input Message and Error Alert tabs.
-
Select OK.
Types of data validation rules
1. List validation
List validation restricts entries to predefined values that appear in a dropdown. Examples include product categories or department names.
Steps:
-
Select the range.
-
Open Data Validation.
-
Choose List.
-
Enter values separated by commas or reference a range.
-
Select OK.
2. Number validation
Number validation sets rules for whole numbers or decimals. Examples include quantities, limits, and ranges.
Steps:
-
Select the range.
-
Open Data Validation.
-
Choose Whole Number or Decimal.
-
Define criteria such as between, greater than, or less than.
-
Enter numeric limits.
-
Select OK.
3. Date validation
Date validation limits entries to a specific period. Examples include due dates or scheduling ranges.
Steps:
-
Select the range.
-
Open Data Validation.
-
Choose Date.
-
Define criteria and set start and end dates.
-
Select OK.
4. Text length validation
Text length validation controls the number of characters. Examples include codes, identifiers, or character limits in form fields.
Steps:
-
Select the range.
-
Open Data Validation.
-
Choose Text Length.
-
Set criteria such as equal to, less than, or between.
-
Enter character limits.
-
Select OK.
5. Custom validation
Custom validation uses formulas to define rules when advanced conditions are needed.
Steps:
-
Select the range.
-
Open Data Validation.
-
Choose Custom.
-
Enter a formula.
-
Select OK.
How to show a message when users select a validated cell
-
Open Data Validation.
-
Select the Input Message tab.
-
Turn on Show input message when cell is selected.
-
Enter a title and message.
-
Select OK.
How to show an error alert when invalid data is entered
-
Open Data Validation.
-
Select the Error Alert tab.
-
Choose an alert style: Stop, Warning, or Information.
-
Add a title and message.
-
Select OK.
How to remove data validation
-
Select the range.
-
Open Data Validation.
-
Choose Clear All.
-
Select OK.
How to copy data validation to another range
-
Select a cell with validation.
-
Copy the cell using Ctrl+C (Windows) or Command+C (Mac).
-
Right-click the target range.
-
Choose Paste Special.
-
Choose Validation.
-
Select OK.
How to find all cells with data validation
-
Select any cell.
-
Press Ctrl+G.
-
Select Special.
-
Choose Data Validation.
-
Select OK.
Related Questions
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to sort by highlighted cells in excel
Answers · 1
How to sort excel by column and keep rows together
Answers · 1
How to sort by time in excel
Answers · 1
How to sort alphabetically in excel by last name
Answers · 1