Lesson 15
14 min
Secure data entry and build reliable tracking forms.
Definition
Data validation is an Excel feature that defines which values areallowed to be entered in a cell: a choice from a list, a number within a range, a date within a period, a text of a given length, or any custom condition. When an entry does not follow the rule, Excel can reject it or warn the user, which prevents errors before they enter the table.
When a workbook is filled in by several people (a tracking form, a file shared across a team), entry errors quickly become common: typos, inconsistent values, impossible dates.Data validation prevents incorrect values from being entered at the source.
The consequences of a bad entry often go beyond the cell concerned. A status written as "Done", "Finished" and "Complete" depending on who types it breaks a filter or a PivotTable by splitting what should be a single group; an amount entered with text makes a sum fail; an impossible date skews a lead-time calculation. It is much easier to prevent the error at entry than to fix it afterwards across hundreds of rows.
The most common case: forcing the user to choose from a predefined list of values, rather than typing text freely.
1. Select the relevant cell or cells
2. Data tab > Data Validation
3. Allow: "List"
4. Source: either type the values separated by commas
(e.g. Open,In progress,Closed)
or select a range of cells that already contains these valuesIn the English version of Excel, values typed directly into the "Source" field are separated by a comma , (depending on your regional settings, Excel may expect a semicolon instead). For a long list, or one likely to change, it is better to enter the values in a range of cells (ideally on a dedicated sheet) and point the source to that range: when you edit the range, all the drop-down lists that use it are updated. Make sure to leave the "In-cell dropdown" option checked, otherwise the small arrow does not appear.

Beyond lists, data validation lets you restrict entry according to other precise criteria.
"Custom" validation formula to allow only a positive amount:
=A2>0
To allow a date only if it is in the future:
=A2>=TODAY()As with conditional formatting, the custom formula is written from the point of view of thefirst cell of the selected range, then adapts to the other cells through relative references. It must return TRUEfor the entry to be accepted. You can use the logical functions covered earlier in it, for example AND to require several conditions at once.
A number between 1 and 100 (formula equivalent to the predefined rule):
=AND(A2>=1, A2<=100)
Forbid duplicates in column A (range A2:A100 selected):
=COUNTIF($A$2:$A$100, A2)=1
Allow entry in B2 only if A2 is filled in:
=A2<>""In the same validation dialog, two additional tabs let you improve the data-entry experience:
A good error message clearly says what is expected, not just what is forbidden. Instead of "Invalid value", write for example "Enter a whole number between 1 and 100". The user immediately understands how to fix their entry, without having to contact you. The "Stop" level suits strict rules, whereas "Warning" is useful when an exception remains possible.

Data validation has its place in almost every shared workbook. Here are typical situations where it prevents many errors.
In the validation dialog, the "Ignore blank" checkbox determines whether a cell left empty is accepted. Leave it checked for an optional field, and uncheck it if the entry must be filled in.
Validation is an effective safeguard, but it is not foolproof. It is important to know its limits so as not to trust it blindly.
To spot invalid values that are already present, use Data > Data Validation > "Circle Invalid Data": Excel draws a red circle around each cell that does not follow the rule. To remove a rule that is no longer needed, open the same dialog and click "Clear All".
A more advanced technique is to make the content of a drop-down list depend on the choice made in another cell — for example, first choosing a country, then displaying only the cities of that country in the second list. This generally relies onnamed ranges combined with the INDIRECT function.
Named ranges: "France" (list of French cities), "Spain" (list of Spanish cities)
Cell A2: drop-down list containing the countries (France, Spain)
Cell B2: Validation > List, Source:
=INDIRECT(A2)
→ if A2 contains "France", the list in B2 displays the cities from the named range "France"The INDIRECT function turns text into a reference: here, the content of A2 is interpreted as the name of a range. For this to work, the name of each range must exactly match a value of the first list, and must not contain spaces.
By combining everything you have learned in this course — formatting, formulas, drop-down lists and validation — you can build a real tracking form: a table where each column enforces its own format and its own rules, drastically reducing everyday data-entry errors.
An effective method: first turn your range into an Excel Table so that the validation rules carry over to new rows, then apply a validation suited to each column (a list for the status, a date for the deadline, a whole number for the quantity), add conditional formatting to highlight delays, and finish with a total row. You get a tool that other people can fill in without any risk of breaking it.
Course wrap-up
You now master the whole Excel learning path: from data entry to advanced analysis with PivotTables, including conditional formulas and charts. That is enough to be autonomous on the vast majority of everyday office tasks.
Exercise
Going further