Excel Tutorial

Excel Tutorial Shortcut Keys in Excel Formatting in Excel Notes in Excel Formats in Excel Cells and Ranges in Excel Excel Function and Formulas Conditional Formatting in Excel Data Validation in Excel Charts in Excel Excel Ribbon Toolbar Basics of Excel Spell Check in Excel Data Analysis in Excel AutoFill in Excel Goal Seek in Excel Solver in Excel Pivots Table in Excel Go-To Special function in Excel Blank cells in Excel Count Cells with Text in Excel Date and Time in Excel-VBA Dependent Drop-down List in Excel Operators in Excel Dependent Combo box in Excel VBA Error Bar in Microsoft Excel Excel Axes Excel File using Password Excel Unique Values Frequency Distribution in Excel Gauge Chart in Excel Histogram in Excel Sum Every Nth Row in Microsoft Excel SumIF Formula in Microsoft Excel Multiplication in Excel Unique Values in Excel Trendline in Excel Excel Themes Copying formula in Excel Check Marks in Excel Calculating the Last Day of the Month in Excel Calculating Age in Excel Insert Row in Excel

Functions

Excel MAX() Function Excel INT() Function Excel MOD() Function Excel ROUND() Function Excel ROUNDUP() Function Excel AVERAGE() Function Excel COUNT() Function Excel COUNTA() Function Excel COUNTBLANK() Function Excel MIN() Function Excel EDATE() Function Excel EOMONTH() Function Excel HOUR() Function Excel MINUTE() Function Excel SECOND() Function Excel TIME() Function Excel WORKDAY() Function Excel WORKDAY.INTL() Function Excel DAYS() Function Excel WEEKNUM() Function Excel WEEKDAY() Function Excel SMALL() Function Excel LARGE() Function Excel LEFT() Function Excel RIGHT() Function Excel MID() Function Excel FIND() Function Excel SEARCH() Function Excel EXACT() Function Excel SUBSTITUTE() Function Excel TEXT() Function Excel VALUE() Function Excel AND() Function Excel OR() Function Excel IFERROR() Function Excel IF() Function Excel Nested IF’s Function Excel IFNA() Function Excel COUNTIFS() Function Excel VLOOKUP() Function Excel HLOOKUP() Function Excel INDEX() Function Excel MATCH() Function Excel OFFSET () Function Averageif Function in Excel

How To

How to import Microsoft Access data into the Microsoft Excel How to use TODAY function in Excel How to Alphabetize in Excel How to remove duplicate values from excel How to lock cells in Excel How to create drop down in excel How to Delete Row in Microsoft Excel How to Highlight Duplicates Words in the Microsoft Excel How to print titles in Excel How to make use of the Wildcard in Excel How to Make Use of the F-Test in Excel How to make use of the Excel Autofit in Excel How to generate random numbers in Excel How to apply Advanced Filter in Excel How to use Index and Match in Excel

Misc

Absolute Value in Excel Adding Column in Excel Converting Units in Excel Count Characters in Excel Custom Sort Order in Excel Decimals in Excel Division in Excel Locate Maximum Values in Excel Nearest Multiple in Excel Paste Options in Excel Quarter Dates in Excel Row Difference in Excel Separate Strings in Excel Reverse List in Excel Array Formula in Excel What if Analysis Data Table in Excel Excel Shortcut Keys What is a spreadsheet in Excel?

Data Validation in Excel

What is Data Validation?

Data Validation is one of the features in Excel that allows user to restrict values which other people can fill in – for example, in a form, you may have options like ‘Mr’, ‘Ms’ or ‘Mrs’, for gender you may have ‘Male’ or ‘Female’, for employee contract you may have ‘Permanent’ or ‘Temporary’ – the whole idea of Data Validation is to give others a list of options to choose from so that the data when entered is consistent.

Data Validation feature improves the efficiency of data entry in excel and reduces mistakes and typing errors. You can have restricted entries as per the validation criteria or even create custom rules for what can be entered in the cell. In case of any invalid entry, it shows a message and prevents the user from entering the data based on a specified condition. For example, in gender, some users might fill M or F or Male or Female – thus, rather than having some fill M and some fill Male – it will always be better to give 1 option either a Male or M.

Similarly, for an employment contract, you may not want everyone to fill different options like ‘Permanent’ or ‘Full-time’ or ‘Contractor’ or ‘Temporary’ or ‘Part-Time’ – but you may want to limit the number of options so that it becomes easier for you to analyze the data.

How to apply data validation?

  • Select the cells on which you want to apply Data Validation
  • Go to Data tab and click on ‘Data Validation’.
  • On the settings tab – default would be ‘Any Value’ which means that there is no limitation currently on the cells which have been selected
  • Choose the relevant option
Different options for Data Validation

Different options for Data Validation

Whole Number – it will restrict users from entering a text or even numbers consisting of decimal points. You can also specify the range in which you want people to enter the numbers – for example: Age for a driving license application needs to be greater than 18 and less than 70.

In the example below, we have taken a range between 5 and 15. The second picture shows that as soon as you add a decimal point and press enter, excel gives an error that this value doesn’t match the data validation restrictions, and we need to change the value.

Whole Number
Different options for Data Validation

Decimal - it will restrict users from entering a text. You can enter whole numbers or numbers, which consist of decimal points. You can also specify a range in which you want users to enter values, or greater than, less than functionalities can also be used using the Data field.

Decimal

List – You can specify a list of items which can be entered in a cell – for ex: for an employee contract the values can be ‘Permanent’, ‘Temporary’ – for list of analytics tool courses it can be ‘MS Excel’, ‘SAS’, ‘R’, ‘Tableau’

For specifying a list, you will first need to write down the list at another location in the excel file and then give the path of the list in the Source field. In the below example, we have created a list of analytics tool courses and given the location of those cells in the ‘Source’ field. When you click on ‘OK’, these lists of courses will start appearing in the cells which we had selected for Data Validation – over here in Column J as can be seen in the second picture below.

Date - You can restrict cells such that users can enter only dates and in that too you can restrict dates by using the ‘Data’ option.

Time - You can restrict cells such that users can enter only dates and in that too you can restrict dates by using the ‘Data’ option.

Text Length - You can restrict cells such that users can enter only text which is of/between specified length by using the ‘Data’ option

For example, if you don’t want the user to enter more than 10 characters, you can select text length, and whenever the user exceeds 10 characters, excel will throw an error

excel will throw an error

Custom – you can enter your own formula in data validation – ISODD – look for other examples

Highlight Cells Rules

Input Message

If you want to display a message whenever a user selects the cells containing Data Validation, you can use ‘Input Message’ and write relevant information in ‘Title’ and ‘Input Message’ fields. Make sure that the ‘Show input message when the cell is selected’ checkbox is ticked.

Input Message

Example 1

Objective: How many hours do you work per day? Enter hours between 1 and 12

The procedure of the above example is as follows:

Step 1- Click on Data --> Data Tools --> Data Validation

Step 2- In the Setting section, under Data select between and the required minimum and maximum value range.

Data select between and the required minimum and maximum

Step 3: Type an appropriate input message.

Type an appropriate input message

Step 4: Create your own error alert to warn the user for wrong or invalid entry.

user for wrong or invalid entry.

Result

Condition 1: When the cell is blank.

When the cell is blank

Condition 2: When you have entered the right value.

When you have entered the right value.

Condition 3: When you have entered a wrong value or value out of the range (1-12). Here we have put the value 18 in the cell that is out of the range (1-12).

When you have entered a wrong value or value out of the range