Excel drop-down lists and Data Validation: lists, limits and error alerts
Create drop-down lists with Data Validation, limit numbers and dates, and customize error alerts. Learn how copy-paste bypasses validation and how to fix it.
When several people fill in a sheet, mistakes are inevitable: one types “Tashkent”, another “Toshkent” or “tashkent ”, someone enters 10000 instead of 1000 in a quantity. Then filters, SUMIF and PivotTables give wrong results.
Data Validation stops the mistake at the moment of entry: a cell accepts only a value from a list, a number within limits or a valid date. Its most popular use is the drop-down list.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | City | Qty | |
| 2 | Aziz | Tashkent | 12 | |
| 3 | Dilnoza | Samarkand | 5 | |
| 4 | Javohir | |||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 |
Create a drop-down list
1
Select the cells for the list (B2:B8) and click Данные → Проверка данных.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | City | Qty | |
| 2 | Aziz | |||
| 3 | Dilnoza | |||
| 4 | Javohir | |||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 |
2
On the Settings tab, set Allow to List. In Source, type the values separated by commas: Tashkent,Samarkand,Bukhara,Andijan. Make sure In-cell dropdown is ticked — that is what shows the ▼ button.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | City | Qty | |
| 2 | Aziz | |||
| 3 | Dilnoza | |||
| 4 | Javohir | |||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 |
3
Click OK. Now when you select a cell in column B, a ▼ appears on the right — click it and pick a city (or press Alt + ↓). Excel rejects any value that isn’t on the list.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | City | Qty | |
| 2 | Aziz | Tashkent | ||
| 3 | Dilnoza | Samarkand | ||
| 4 | Javohir | |||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 |
List source: typed values or a range
Typing values into Source is quick, but every change means reopening the dialog. A better way is to keep the values in a separate column (say, on a “Lists” sheet) and point Source to that range: =$F$2:$F$5. Edit the list in the cells and the drop-down updates itself.
The list can live on another sheet — just switch to it with the mouse and select the range.
Number limits and the error alert
1
Select the Qty column (C2:C8) → Проверка данных. Set Allow to Whole number, Data to between, Minimum to 1 and Maximum to 100. Now only whole numbers from 1 to 100 are accepted: 0, -5, 2.5 or 150 are rejected.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | City | Qty | |
| 2 | Aziz | Tashkent | 12 | |
| 3 | Dilnoza | Samarkand | 5 | |
| 4 | Javohir | Bukhara | ||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 |
2
On the Input Message tab, add a title and a hint such as “Whole number from 1 to 100”. When the cell is selected, a yellow tooltip appears — people see the rule before they get it wrong.
3
On the Error Alert tab, set up the error box: Style Stop, Title “Invalid quantity”, Error message “Quantity must be between 1 and 100”. A clear message is far more useful than Excel’s generic one.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | City | Qty | |
| 2 | Aziz | Tashkent | 12 | |
| 3 | Dilnoza | Samarkand | 5 | |
| 4 | Javohir | Bukhara | ||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 |
Stop, Warning or Information — a big difference
- Stop — an invalid value can’t be entered at all: only Retry or Cancel.
- Warning — asks “Continue?”; click Yes and the invalid value goes in.
- Information — just informs; click OK and the value is accepted.
So only Stop really protects your data. Warning and Information are reminders.
Other Allow types: Decimal, Date (for example, only dates in 2025), Time, Text length (for example, a phone number of exactly 9 characters) and Custom (your own formula).
Pro level: Custom — validate with your own formula
With Allow → Custom you can express any condition as a formula: if it returns TRUE, the value is accepted. Write the formula for the first cell of the selected range; Excel adjusts it for the rest.
- Unique ID or phone number:
=СЧЁТЕСЛИ($A$2:$A$100;A2)=1 - Only a 9-digit number:
=И(ЕЧИСЛО(C2);ДЛСТР(C2)=9) - No future dates: Allow — Date, Data — less than or equal to, End date —
=СЕГОДНЯ() - Dependent drop-downs: pick a region in the first column, and the second shows only its districts. Name each district list after its region (Name Manager) and set the second column’s Source to
=ДВССЫЛ(A2).
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer ID | Name | ||
| 2 | M-101 | Aziz | ||
| 3 | M-102 | Dilnoza | ||
| 4 | M-103 | Javohir | ||
| 5 | M-102 | |||
| 6 | ||||
| 7 | ||||
| 8 |
Try it in the simulator
Test the Custom rule formula first: type =СЧЁТЕСЛИ($A$2:$A$7;A2)=1 in C2 and fill it down to C7. Rows showing FALSE are duplicate IDs — Data Validation with this formula would block them.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Customer ID | Name | Unique? | |||||||||||||||||||||
| 2 | M-101 | Aziz | ||||||||||||||||||||||
| 3 | M-102 | Dilnoza | ||||||||||||||||||||||
| 4 | M-103 | Javohir | ||||||||||||||||||||||
| 5 | M-102 | Malika | ||||||||||||||||||||||
| 6 | M-104 | Sardor | ||||||||||||||||||||||
| 7 | M-101 | Nodira | ||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 | ||||||||||||||||||||||||
| 11 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.