Excel tutorial
/

Functions

Intermediate

How to use MATCH in Excel: find a value’s position in a list

MATCH returns the position of a value in a list. Match types 0, 1 and -1, comparing two lists, pairing with INDEX and the usual traps — with examples.

MATCH returns not the value itself but its position: “Javohir is 3rd in the list”. At first glance that seems useless, but this very number is what other formulas need.

What MATCH is used for:

  • Together with INDEX — left lookups and two-way lookups (its most famous use).
  • Supplying VLOOKUP’s column number — the formula survives inserted columns.
  • Checking whether a value is in a list — a guest list, reconciling two reports.
  • Which bracket a value falls into — score bands, discount levels.
Книга1 - Excel
—☐✕
E2fx=ПОИСКПОЗ(E1;A2:A6;0)
ABCDEF
1StudentScoreName:Javohir1
2Aziz88Position:3
3Dilnoza92
4Javohir275
5Malika95
6Sardor81
7
Готово
MATCH finds “Javohir” (1) in A2:A6 (2) and returns 3 — the position in the range, not the sheet row number (which is 4)

Syntax

=ПОИСКПОЗ(lookup_value; lookup_array; [match_type])

  • lookup_value — what to find.
  • lookup_array — a single column or a single row.
  • match_type — the kind of search:
  • 0 — exact match; the list can be in any order. You need this 90% of the time.
  • 1 — the largest value that is not greater than the lookup value. The list must be sorted ascending.
  • -1 — the smallest value that is not less than the lookup value. The list must be sorted descending.

Watch out: if you omit the 3rd argument, Excel treats it as 1, not 0.

Writing MATCH step by step

1

Select the result cell (E2). Формулы → Ссылки и массивы → MATCH.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить функциюАвтосуммаФинансовыеЛогическиеТекстовыеДата и времяСсылки и массивыМатематические
Библиотека функций
Диспетчер имён
Определённые имена
E2fx
ABCDEF
1StudentScoreName:Javohir
2Aziz88Position:
3Dilnoza92
4Javohir75
5
Готово

2

Arguments: Lookup_value — E1; Lookup_array — the name column A2:A6; Match_type — 0. Never leave this last box empty.

Книга1 - Excel
—☐✕
E2fx
ABCDEF
1StudentScoreName:Javohir
2Aziz88Position:
3Dilnoza92
4Javohir75
5Malika95
6Sardor81
7
ГотовоКоличество: 5

3

Click OK — the result is 3. Type another name in E1: Malika gives 4, Aziz gives 1. A name that isn’t in the list gives #N/A.

Книга1 - Excel
—☐✕
E2fx=ПОИСКПОЗ(E1;A2:A6;0)
ABCDEF
1StudentScoreName:Malika
2Aziz88Position:4
3Dilnoza92
4Javohir75
5Malika95
6Sardor81
7
Готово

All three types in one example

A discount scheme: which tier does a purchase amount fall into? The limits are listed in ascending order. With match_type = 1, for 750,000 soums MATCH finds the 500,000 limit (position 3) — the largest limit that is not greater than 750,000.

Search for the same 750,000 with 0 and you get #N/A: no such exact value exists in the list. 500,000 with 0 gives 3.

Type -1 covers the reverse case: if the list is sorted descending (5,000,000, 1,000,000, …), it finds the smallest value that is not less than the one you look up.

Книга1 - Excel
—☐✕
E2fx=ПОИСКПОЗ(C2;$A$2:$A$6;D2)
ABCDEF
1Limit, soumLookupTypeResult
20750 00013
3100 000500 00003
4500 000750 0000#N/A
51 000 000
65 000 000
7
Готово
Type 1: 750,000 → 3 (the 500,000 limit). Type 0: 500,000 → 3, 750,000 → #N/A

A practical example: comparing two lists

Five people registered for an event, and arrivals were written down at the door. Who is on the list and who isn’t? If MATCH finds the value it returns a number; if not, #N/A. ISNUMBER turns that into TRUE/FALSE, and IF into a clear word:

=ЕСЛИ(ЕЧИСЛО(ПОИСКПОЗ(C2;$A$2:$A$6;0));"Yes";"No")

The same trick reconciles warehouse stock with the accounting list, or this month’s clients with last month’s.

Книга1 - Excel
—☐✕
D3fx=ЕСЛИ(ЕЧИСЛО(ПОИСКПОЗ(C3;$A$2:$A$6;0));"Yes";"No")
ABCDE
1RegisteredArrivedOn the list?
2AzizMalikaYes
3DilnozaBekzodNo
4JavohirAzizYes
5MalikaNodiraNo
6Sardor
7
Готово
Bekzod and Nodira are not on the list — MATCH didn’t find them

Pro level: “who’s the best?” and wildcards

Whose score is highest? MAX finds the top score, MATCH finds its position, and INDEX returns the name at that position:

=ИНДЕКС(A2:A6;ПОИСКПОЗ(МАКС(B2:B6);B2:B6;0))

If there is a tie, MATCH returns the first match.

Wildcards (type 0 only): =ПОИСКПОЗ("Dil*";A2:A6;0) — the first name starting with “Dil”; "*bek" — ending with “bek”; "?ziz" — any one letter followed by “ziz”.

With VLOOKUP: =ВПР(F2;A1:E50;ПОИСКПОЗ("Salary";A1:E1;0);ЛОЖЬ) takes the column number from the header, so it keeps working after columns are inserted.

Книга1 - Excel
—☐✕
E3fx=ИНДЕКС(A2:A6;ПОИСКПОЗ(E1;B2:B6;0))
ABCDEF
1StudentScoreTop score:95
2Aziz88Position:4
3Dilnoza92Whose:Malika
4Javohir75
5Malika95
6Sardor81
7
Готово
The score 95 is at position 4 in column B; INDEX takes the name at position 4 of column A — Malika

Try it in the simulator

Type =ЕСЛИ(ЕЧИСЛО(ПОИСКПОЗ(C2;$A$2:$A$6;0));"Yes";"No") in D2 and fill it down to D5. Then type =ПОИСКПОЗ(C2;$A$2:$A$6;0) in E2 to find Malika’s position on the list.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1RegisteredArrivedOn the list?Position
2AzizMalika
3DilnozaBekzod
4JavohirAziz
5MalikaNodira
6Sardor
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

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

Support us
Previous

98 / 154