Data Validation in Excel: Drop-Down Lists and Entry Rules

7 min read

Data validation in Excel controls what can be typed into a cell. Select the cells, go to Data > Data Validation, and on the Settings tab choose what to allow: a list (which gives you a drop-down), whole numbers or decimals within limits, dates in a range, a text length, or a custom formula. Anything outside the rule is refused with an error message you can write yourself.

To make a drop-down list, choose Allow: List and type the options in Source separated by commas, such as Prepaid,COD,To-pay, or point Source at a range of cells. That covers most uses. The rest of this lesson shows dependent drop-downs, lists that grow on their own, formula rules that stop duplicates, and the gap in data validation that lets bad data in anyway.

The data used throughout

A logistics firm in Nagpur books shipments at four depots. Depot staff type each booking into a shared Excel sheet, and the head office pulls it into a weekly report. Before validation, the report had “Amravati”, “Amrawati” and “amravati” as three depots, pincodes with five digits, and booking dates in 2062. Here is the sheet the staff fill, with headers in row 1.

A: AWB number B: Booking date C: Origin depot D: Destination state E: Destination city F: Weight (kg) G: Pincode H: Payment mode
NGP0045127 2026-11-10 Nagpur Maharashtra Pune 12.5 411014 Prepaid
NGP0045128 2026-11-10 Wardha Telangana Hyderabad 3 500081 COD
NGP0045129 2026-11-11 Amravati Madhya Pradesh Indore 48 452010 To-pay

A second sheet called Lists holds the allowed values: the four depots, the three destination states, and the cities in each state. Keeping lists on their own sheet means anyone can update them without touching the rules.

The Allow options

The Settings tab of the Data Validation dialog has an Allow drop-down. This table shows each option and a rule from the shipment sheet that uses it.

Allow What it permits Settings on this sheet Column
Any value Anything (the default, no validation) None None
Whole number Integers within limits Between 100000 and 999999 G: Pincode
Decimal Numbers with decimals within limits Between 0.1 and 1000 F: Weight
List Only values from a list, with a drop-down Source: Prepaid,COD,To-pay H: Payment mode
Date Dates within limits Between =TODAY()-7 and =TODAY() B: Booking date
Time Times within limits Between 09:00 and 21:00 A pickup slot column
Text length Text of a set number of characters Equal to 10 A: AWB number, simple version
Custom Anything a TRUE or FALSE formula can test See the formula rules below A: AWB number, strict version

Two of those settings use formulas instead of fixed values, which is allowed in any limit box. The date rule recalculates every day, so it always means “within the last week”.

Making a drop-down list

From a typed list

  1. Select H2:H500.
  2. Go to Data > Data Validation and open the Settings tab.
  3. Set Allow to List and keep “In-cell dropdown” ticked.
  4. In Source, type Prepaid,COD,To-pay with commas and no spaces after them.
  5. Click OK.

Each cell now shows an arrow when selected, and typing “Cash” is refused. Use typed lists only for short, fixed sets: the Source box takes at most 255 characters, and changing an option means editing every rule.

From a range that grows by itself

For the depot list, put the depots in an Excel Table on the Lists sheet (select them and press Ctrl+T), and name the table tblDepots with its column called Depot. Then create a name for that column: Formulas > Name Manager > New, call it DepotList, and set Refers to as =tblDepots[Depot]. In the validation dialog for C2:C500, set Allow to List and Source to =DepotList.

Data validation cannot read a table reference typed straight into Source, which is why the name sits in between. The benefit is that when the firm opens a fifth depot at Chandrapur, someone adds it under the table and every drop-down includes it at once.

A dependent drop-down: city depends on state

The destination city list should change with the state chosen in column D. Pune should not be offered when the state is Telangana. This takes three steps.

  1. On the Lists sheet, put each state’s cities in a column with the state as the header.
  2. Select those columns including headers, go to Formulas > Create from Selection, and tick Top row only. Excel creates one named range per state, replacing spaces with underscores, so Madhya Pradesh becomes Madhya_Pradesh.
  3. Select E2:E500 and add a List rule with Source =INDIRECT(SUBSTITUTE(D2, ” “, “_”)).

The Lists sheet looks like this.

Maharashtra Madhya_Pradesh Telangana
Mumbai Bhopal Hyderabad
Pune Indore Warangal
Nashik Jabalpur Karimnagar

INDIRECT turns the text in D2 into a reference to the range of that name. Pick Telangana in D2 and the E2 drop-down offers Hyderabad, Warangal and Karimnagar. The SUBSTITUTE is there for Madhya Pradesh, because range names cannot contain spaces.

One weakness: if someone picks Maharashtra and Pune, then changes the state to Telangana, Pune stays in column E. Validation checks only at the moment of typing. The Circle Invalid Data step further down catches these.

Custom formula rules

The Custom option accepts any formula that returns TRUE or FALSE, written for the first cell of the selection. If the formula returns FALSE for what someone typed, the entry is refused. These are the rules on the shipment sheet; each formula is written for row 2 and Excel adjusts it for the rows below.

Purpose Applied to Formula
No duplicate AWB numbers A2:A500 =COUNTIF($A$2:$A$500, A2)=1
AWB is NGP followed by seven digits A2:A500 =AND(LEN(A2)=10, EXACT(LEFT(A2, 3), “NGP”), ISNUMBER(–RIGHT(A2, 7)))
Both rules together A2:A500 =AND(COUNTIF($A$2:$A$500, A2)=1, LEN(A2)=10, EXACT(LEFT(A2, 3), “NGP”), ISNUMBER(–RIGHT(A2, 7)))
Weight entered only once a depot is chosen F2:F500 =C2<>””
COD capped at 50 kg H2:H500 =OR(H2<>”COD”, F2<=50)
No weekend bookings B2:B500 =WEEKDAY(B2, 2)<6

EXACT is there because Excel’s ordinary comparison ignores case: LEFT(A2, 3)=”NGP” would accept “ngp0045127”. The double minus in –RIGHT(A2, 7) turns the last seven characters into a number if they are all digits, and ISNUMBER checks that it worked. A cell can hold only one validation rule, which is why the third row combines the first two.

To see what the combined AWB rule does, here are some test entries typed into column A, with today taken as 12 November 2026, and some for the other columns too.

Typed Column Result Why
NGP0045130 A Accepted Ten characters, NGP, seven digits, not used before
NGP45130 A Refused Only eight characters
ngp0045130 A Refused EXACT is case-sensitive
NGP0045127 A Refused Already used in A2
2026-11-15 B Refused In the future
2026-11-06 B Accepted Within the last seven days
2026-11-04 B Refused More than seven days ago
44001 G Refused Five digits, below 100000

Input messages and error alerts

The other two tabs of the dialog decide what the person typing sees.

The Input Message tab shows a small note when the cell is selected, before anything is typed. Use it for the rule in plain words: “AWB number: NGP and 7 digits, e.g. NGP0045130”. It saves more bad entries than the error does.

The Error Alert tab sets what happens when the rule is broken. There are three styles, and they differ in how strict they are.

Style What the person sees Can they keep the bad value? Use it for
Stop Retry or Cancel No Values that would break a report, such as duplicate IDs
Warning Continue? Yes, No or Cancel Yes, by clicking Yes Unusual but possible values, such as a 900 kg shipment
Information OK or Cancel Yes, by clicking OK Gentle reminders

Write the error message too. “The value you entered is not valid” helps nobody; “Pincode must be 6 digits” fixes the entry on the next try.

The gap: pasted data skips validation

Data validation checks only what is typed. Paste a value into a validated cell and the paste replaces the cell’s validation rule along with its value, or the value goes in unchecked if you use Paste Special > Values. Data that was already there before you added the rule is not checked either. Depot staff copying rows from an old file can undo all of this without seeing a single error.

Two tools close the gap. Data > Data Validation (click the arrow on the button) > Circle Invalid Data draws a red circle round every cell that breaks its rule, including old and pasted values. Clear Validation Circles removes them. And Home > Find & Select > Data Validation selects every cell that has a rule, so you can see where the protection has been pasted away.

If the sheet must not be altered by anyone else, protect it as well: clear the Locked box on the entry cells (Format Cells > Protection), then Review > Protect Sheet. Validation plus protection is much stronger than either alone.

Copying and removing rules

Task How
Copy a rule to other cells without overwriting their values Copy, then Paste Special > Validation
Change a rule on many cells at once Select one, open Data Validation, tick “Apply these changes to all other cells with the same settings”
Remove all rules from a range Select it, Data > Data Validation > Clear All
Find every cell with a rule Home > Find & Select > Data Validation

Mistakes that make validation useless

Leaving the default error message. People retry blindly. Say what is expected.

Typing a long list into Source. It breaks past 255 characters and has to be edited in every rule. Use a range on a lists sheet.

Forgetting that the formula is written for the first cell. A custom rule of =COUNTIF($A$2:$A$500, A3)=1 applied from A2 checks the wrong row everywhere.

Trusting validation to clean existing data. It does not look backwards. Run Circle Invalid Data after adding any rule to a sheet that already has rows, and clean what it finds with the steps in our lesson on removing duplicates and cleaning data in Excel, part of this series.

Using Stop for everything. If a legitimate value is refused, people copy it from elsewhere and paste it in, which removes the rule. Use Warning where exceptions are real.

Excel for Mac and Google Sheets

On a Mac, the button is Data > Data Validation and the dialog has the same three tabs and the same Allow options. Create from Selection is at Formulas > Create from Selection, as on Windows. Google Sheets has the feature at Data > Data validation, where “Dropdown (from a range)” gives a drop-down and “Custom formula is” works like Excel’s Custom option.

Frequently asked questions

How do I create a drop-down list in Excel?

Select the cells, go to Data > Data Validation, set Allow to List, and in Source either type the options separated by commas or select a range that holds them. Keep “In-cell dropdown” ticked and click OK. Each cell then shows an arrow with the allowed values, and anything else typed in is refused.

How do I create a dependent drop-down list in Excel?

Put each parent value’s options in a column headed by that value, select them, and use Formulas > Create from Selection with Top row ticked to name each column. Then give the child column a List rule with Source =INDIRECT(SUBSTITUTE(D2, ” “, “_”)), where D2 holds the parent choice. The child drop-down then shows only the options named after the value picked in D2.

How do I stop duplicate entries in an Excel column?

Select the column’s entry range, go to Data > Data Validation, choose Custom, and enter a formula such as =COUNTIF($A$2:$A$500, A2)=1. Set the Error Alert style to Stop with a clear message. Anyone typing a value that already exists in the range is refused.

Why does data validation not stop pasted values?

Data validation checks only values typed into a cell. A normal paste replaces the cell’s rule with whatever the copied cell had, and Paste Special Values enters the value without checking it. Use Data Validation > Circle Invalid Data to find entries that break the rule, and protect the sheet if people paste in data often.

How do I edit or remove a drop-down list in Excel?

Select a cell with the drop-down and open Data > Data Validation. Change the Source and tick “Apply these changes to all other cells with the same settings” to update every copy, or click Clear All to remove validation from the selected cells. If the list comes from a named range or table, editing the list itself updates the drop-down with no change to the rule.

Can I make a drop-down list from another sheet?

Yes. Set Source to the range on the other sheet, such as =Lists!$A$2:$A$5, or better, to a named range like =DepotList. A named range defined on an Excel Table column grows automatically when new items are added. Very old versions of Excel needed a named range for any cross-sheet list, so a name is also the most compatible choice.

Validation is cheaper than cleaning

Every rule you put in front of data entry is a cleaning job you never have to do later. That matters most on shared sheets that feed reports, like the dealer sheet in our lesson on conditional formatting in Excel, or the inputs that drive the slicers and lookups in a dashboard. For the formulas that sit behind those reports, see our guide to Excel for data analysis, and for summarising the clean data, pivot tables. Data validation also comes up regularly in Excel interview questions.

SkilloVilla’s Excel: Beginner to Advanced course has a module on data validation, including formula-based rules, alongside named ranges, lookup functions, data cleaning and interactive dashboards, taught in live classes. If you want Excel inside a full analyst programme with SQL, Python and placement support, see the Data Analytics with Python track.

Power Query in Excel: Get and Transform Data, Step…

Power Query in Excel explained: import with Get Data, clean and reshape in the editor, merge and append, load to a table or the...
SkilloVilla Team
8 min read

How to Build an Excel Dashboard, Step by Step

Build an interactive Excel dashboard step by step: data layout, pivot set-up, KPI formulas with GETPIVOTDATA, chart choices, slicers and refresh.
SkilloVilla Team
8 min read

Conditional Formatting in Excel, With Formula Rules and Examples

Conditional formatting in Excel explained: highlight rules, top and bottom, data bars, colour scales, icon sets, and formula rules that colour a whole row.
SkilloVilla Team
7 min read

Leave a Reply