Data validation is a feature in Excel which is used to control what users can enter into a cell. It allows you to dictate specific rules. It also allows users to display a custom message if users try to enter invalid data.
What Is Data Validation in Excel?
Data validation in Excel is a technique that restricts user input in a worksheet. It is often used to limit user entry.
The settings tab is where you enter the validation criteria. There are eight options available to validate for user input:
- Any Value - It removes any existing data validation.
- Whole Number - It allows only whole numbers. For example, you can specify that the user must enter the number between 0 to 30.
- Decimal - The user must enter a number with decimal values.
- List - The user will have to create a drop-down list to choose from.
- Date - The user will have to enter the date format.
- Time - The user should enter a time.
- Text Length - It validates input based on the length of the data.
- Custom - It validates the user input using a custom formula.
Input Message Tab
You can set the input message to explain what data is allowed in a given cell. This tab is optional.
- Check the 'show input message when the cell is selected'.
- Enter a title.
- Enter an Input message.
Error Alert Tab
You can show the error message if the user tries to enter the invalid data.
On the error message tab:
- Check the ‘Show error alert after invalid data is entered’ box.
- Enter a title.
- Enter an error message.
Now, when you try to enter the value beyond the range, you will get an error message.
Now that we are familiar with the basic concepts, let’s look at a step-by-step process to implement data validation in excel.
How to Validate Data in Excel?
1. Select the cell you want to validate. Go to the Data tab > Data tools, and click on the Data Validation button.
A data validation dialogue box will appear having 3 tabs - Settings, Input Message, and Error Alerts.
2. On the settings tab, specify your validation criteria.
3. You can enter the input message if you want. This step is optional.
4. You can also set your custom error message. This step is optional.
5. Click OK. Now, if you try entering a value outside the specified range (10, 50), it will result in an error.
Excel Data Validation List (Drop-Down)
To add the drop-down list, follow the following steps:
- Open the data validation dialog box.
- On the Settings tab, select the list.
- In the source box, enter the list of your validation, separated by commas.
You will get the following result.
You can set-up the date validation in Excel. Select date in the allow box and pick up the appropriate criteria.
Follow these steps to set-up date validation:
- Select the cells where you’d be applying the data validation.
- From the allowed dropdown, select the date.
- From the Data drop-down, select between.
- Click in the Start Date box and select cell O10, where the Start Date is entered.
- Press the F4 key to change the cell reference to an absolute reference -- $O$10.
- Click in the End Date box and select cell O11, where the End Date is entered.
- Press the F4 key to change the cell reference to an absolute reference -- $O$11.
- Click OK to close the Data Validation window.
The above date validation will only accept date values between 9th Nov 2020 to 18th Nov 2020.
Gain expertise in the latest Business analytics tools and techniques with the Business Analyst Master's Program. Enroll now!
The data validation in Excel provides a way of limiting the mistakes from the user and collecting valid data from the user. It results in standard data entry and systematic reporting.
Boost your analytics career with powerful new Microsoft Excel skills by taking the Business Analytics with Excel certification course, which includes Power BI training. You can even enroll for the Post Graduate Program in Business Analysis that helps you build extensive business expertise with real-world projects
The Business Analytics course is a comprehensive program that provides a very thorough understanding of the basic concepts of data analysis and statistics and how they help in data-driven decision making. The Business analytics training introduces you to Power BI, one of the most popular BI tools today, and allows you to learn the key statistical concepts to derive insights from the available data sets and help you present your findings using executive-level dashboards.
If you have any questions, do reach out to us by placing your queries in the comments section of this article (at the bottom). Our subject matter experts will promptly answer them for you.