Excel tutorial
/

Data analysis

Intermediate

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.

Книга1 - Excel
—☐✕
B4fx
ABCD
1CustomerCityQty
2AzizTashkent12
3DilnozaSamarkand5
4JavohirTashkentSamarkandBukharaAndijan
5
6
7
8
9
Готово
A drop-down list in the City column: no typing needed, and no way to misspell

Create a drop-down list

1

Select the cells for the list (B2:B8) and click Данные → Проверка данных.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Получить данныеОбновить все
Получить данные
СортировкаФильтр
Сортировка и фильтр
Текст по столбцамУдалить дубликатыПроверка данных
Работа с данными
B2fx
ABCD
1CustomerCityQty
2Aziz
3Dilnoza
4Javohir
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.

Книга1 - Excel
—☐✕
B2fx
ABCD
1CustomerCityQty
2Aziz
3Dilnoza
4Javohir
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.

Книга1 - Excel
—☐✕
B4fx
ABCD
1CustomerCityQty
2AzizTashkent
3DilnozaSamarkand
4JavohirTashkentSamarkandBukharaAndijan
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.

Книга1 - Excel
—☐✕
C2fx12
ABCD
1CustomerCityQty
2AzizTashkent12
3DilnozaSamarkand5
4JavohirBukhara
5
6
7
8
9
ГотовоСреднее: 8,5Количество: 2Сумма: 17

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.

Книга1 - Excel
—☐✕
C2fx12
ABCD
1CustomerCityQty
2AzizTashkent12
3DilnozaSamarkand5
4JavohirBukhara
5
6
7
8
9
ГотовоСреднее: 8,5Количество: 2Сумма: 17

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).
Книга1 - Excel
—☐✕
A2fxM-101
ABCD
1Customer IDName
2M-101Aziz
3M-102Dilnoza
4M-103Javohir
5M-102
6
7
8
ГотовоКоличество: 4
With this rule, M-102 can’t be entered a second time in A5 — IDs stay unique

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.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1Customer IDNameUnique?
2M-101Aziz
3M-102Dilnoza
4M-103Javohir
5M-102Malika
6M-104Sardor
7M-101Nodira
8
9
10
11
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

43 / 154