
The Data Validation feature is more powerful than most users realize. Beyond basic dropdown lists, it can enforce rules, prevent mistakes, and guide users to enter valid, consistent data. These advanced techniques make your spreadsheets more robust and user-friendly. You can apply Data Validation in both Excel and Google Sheets.
In this tutorial, we’ll learn 3 data validation techniques for building error-proof spreadsheets.
1. Create Dependent Dropdown Lists (Chained Filters)
Dependent dropdowns allow the options in one list to change based on the selection in another, creating a filtered chain of choices. It depends on the previous selections, producing a logical flow of data entry.
This is great for scenarios like locations, product categories, or any hierarchical data.
Step 1: Prepare Your Data Lists
To create named ranges for your data, place the lists on another worksheet. We listed the countries and their corresponding cities in separate columns.

Step 2: Create Named Ranges
- Select the list of countries and cities (e.g., A1:D4).
- Go to the Formulas tab >> select Create from Selection.
- In the dialog box:
- Select Top Row to create names from values.
- Click OK.

- Go to the Formulas tab >> select Name Manager to verify the lists.

Another Way:
- Or go to the Formulas tab >> select Define Name.
- Select US cities (B1:B3) and name the range USA (no spaces).
Step 3: Set Up First Dropdown
- Go to the main data sheet.
- Select the cells where users choose a country (e.g., C2:C100).
- Go to the Data tab >> select Data Validation.
- From the Allow: dropdown >> choose List.
- In the Source field, type: =Country
- Click OK.

Step 4: Create Dependent Dropdown
- Select the cells for city selection (e.g., D2:D100).
- Go to the Data tab >> select Data Validation.
- Choose List from the Allow dropdown.
- In the Source: field, use INDIRECT to reference the selected country:
- Click OK.
=INDIRECT($C2)
This references the named range based on the selection in C2.

Test:
- Select USA in cell C2.
- Only the USA cities appear in the City dropdown.
- This dynamic dependency ensures consistent country–city pairs.

2. Prevent Duplicate Entries With Custom Formulas
You can stop users from entering duplicate values in a column or range using formula-based validation. This ensures data integrity for IDs, email addresses, or any unique identifiers.
Steps:
- Select the range where duplicates should be forbidden (e.g., A2:A100).
- Go to the Data tab >> select Data Validation.
- Select Custom from the Allow: dropdown.
- In the Formula (or Source) field, insert the following formula.
- Click OK.
=COUNTIF($A$2:$A$100, A2)=1
The COUNTIF formula counts how many times the current value appears in the range. If it equals 1, the entry is unique and valid. If it’s 2 or more, validation fails.

- Insert a duplicate entry, and it will show the validation error.

Set an Error Alert:
- Select the range where duplicates should be forbidden (e.g., A2:A100).
- Go to the Data tab >> select Data Validation.
- Go to the Error Alert tab.
- Select a Style: Stop.
- Insert a Title: Duplicate Entry.
- Type Error message: “This OrderID has already been used.”
- Click OK.

Now the data validation will block any input that duplicates an existing value in the specified range, preventing duplicates dynamically.
Test:
- Try to insert a duplicate OrderID.
- An error alert appears showing an error message.
- Duplicate entries are blocked instantly, keeping your sales records unique.

3. Block Invalid Dates and Numbers
You can create intelligent validation that goes beyond simple “between” rules. Block invalid dates, prevent illogical entries, and enforce business rules. Ensure users can’t enter invalid dates (such as future or past dates) or unrealistic quantities (like negative numbers).
3.1. Validate Dates Within a Range
- Select the Date column (e.g., B2:B100).
- Go to the Data tab >> select Data Validation.
- In Allow: select Date.
- In Data: select Between.
- Set Start date:
=DATE(2025,1,1)
- Set End date:
=TODAY()
- Click OK.

Add an Input Message:
- Select the Date column (e.g., B2:B100).
- Go to the Data tab >> select Data Validation.
- Go to the Input Message tab.
- Insert Title: Insert Date.
- Type the following Input Message: “Enter a valid date between Jan 1, 2025, and today.”
- Click OK.

Test:
- Select a cell, and the input message appears.
- Try to insert a random date.

- An alert shows an error message.
- Users can’t enter dates outside the defined window.
3.2. Validate Numbers (Quantity)
- Select the Quantity column (e.g., F2:F100).
- Go to the Data tab >> select Data Validation.
- Select Whole Number from the Allow: dropdown.
- Select Data: Between.
- Set Minimum: 1
- Set Maximum: 100
- Click OK.

Test:
- If you enter 0, a negative, or a too-large value, Excel rejects it.
- This ensures data integrity.

Conclusion
You can use these three data validation techniques to build error-proof spreadsheets. These can turn ordinary Excel sheets into professional-grade tools. By combining these validations, you can create spreadsheets that are error-proof, consistent, and reliable—perfect for data entry forms, reports, or business templates. Start with one technique, test it thoroughly, then layer on additional validation as needed.
Get FREE Advanced Excel Exercises with Solutions!