What is Data Validation in Excel?
Data Validation in Excel is a feature that helps control and restrict the type of data entered into a cell. It ensures accuracy and consistency by allowing only predefined values or formats.
Purpose of Data Validation
* Prevent Invalid Data Entry – Restrict users from entering incorrect values.
* Ensure Data Consistency – Standardize inputs like dates, numbers, or text formats.
* Improve Data Entry Efficiency – Guide users with dropdown lists or error messages.
* Enhance Accuracy – Minimize errors in calculations and reports.
How to Apply Data Validation
-
Select the Cell(s) or Range
- Click on the cell(s) where you want to apply validation.
-
Open the Data Validation Menu
- Go to the Data tab → Click Data Validation in the "Data Tools" group.
-
Choose Validation Criteria
- Under the Settings tab, select from different validation types:
- Whole Number (Restrict to whole numbers only)
- Decimal (Allow only decimal values)
- List (Create a dropdown menu)
- Date (Restrict to specific date ranges)
- Time (Set allowed time frames)
- Text Length (Limit characters in text)
- Custom (Use formulas for complex rules)
-
Set Conditions
- Enter the allowed range or values (e.g., min/max for numbers, a date range, etc.).
-
Add Input Message (Optional)
- Under the Input Message tab, provide instructions that appear when users select the cell.
-
Add an Error Alert (Optional)
- Under the Error Alert tab, customize a warning message if users enter invalid data.
-
Click OK to Apply.
Examples of Data Validation
1. Create a Dropdown List
- Select cells (
A1:A10
).
- Open Data Validation → Choose List.
- Enter values like:
Apple, Banana, Orange
- Click OK → A dropdown menu will appear in the selected cells.
2. Restrict Numbers Between 1 and 100
- Select a cell.
- Open Data Validation → Choose Whole Number.
- Set Minimum:
1
, Maximum: 100
.
- Click **OK`.
3. Restrict Dates to a Specific Range
- Select a cell.
- Open Data Validation → Choose Date.
- Set the start date as
01/01/2024
and the end date as 12/31/2024
.
- Click OK.
4. Allow Only Email Format (Using Custom Formula)
How to Remove Data Validation
- Select the cell(s).
- Go to Data → Data Validation.
- Click Clear All → OK.