Working...
Excel Data Validation
1. Understanding the Need for Excel Data Validation
Data Validation in Excel helps control the type of data entered into a cell.
It ensures data accuracy, consistency, and prevents invalid or incorrect entries.
For example, you can restrict users to enter only numbers, dates, or values from a predefined list.
Use Cases:
- Allow only whole numbers between 1 and 100.
- Accept only dates within a project timeline.
- Limit entries to department names like HR, Finance, Sales.
2. Creating an Excel Data Validation List
A drop-down list allows users to pick from set options rather than typing manually.
Steps:
- Select the cell or range.
- Go to Data → Data Validation → Settings tab.
- In Allow, choose List.
- In Source, type options separated by commas (e.g.,
Yes,No,Maybe) or refer to a cell range (=$A$1:$A$3). - Click OK.
Result:
A drop-down list appears, ensuring only predefined values can be selected.
3. Excel Decimal Data Validation
You can restrict entries to specific decimal ranges.
Steps:
- Select cells → Data → Data Validation.
- Choose Decimal under Allow.
- In Data, choose a condition like between.
- Enter the minimum and maximum values (e.g.,
0and100).
Example:
Only values between 0.5 and 9.99 are accepted.
4. Adding a Custom Excel Data Validation Error
You can show a custom message when users enter invalid data.
Steps:
- After setting validation rules, open the Error Alert tab.
- Check Show error alert after invalid data is entered.
- Choose a Style:
- Stop (prevents invalid entry)
- Warning (allows entry after warning)
- Information (just informs user)
- Add a Title and Message (e.g., “Invalid Entry: Please enter numbers only.”)
5. Dynamic Formulas by Using Excel Data Validation Techniques
You can make dynamic drop-downs that change based on another cell’s selection.
Example:
- Cell A1: Country (India, USA)
- Cell B1: City (changes based on country)
Steps:
- Create lists for each country (e.g., IndiaList, USAList) and define named ranges.
- In Cell B1 → Data Validation → Allow: List.
- In Source, enter formula:
=INDIRECT(A1) - Now, when “India” is selected in A1, only Indian cities appear in B1.
No comments:
Post a Comment