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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Student | Score | Name: | Javohir1 | ||
| 2 | Aziz | 88 | Position: | 3 | ||
| 3 | Dilnoza | 92 | ||||
| 4 | Javohir2 | 75 | ||||
| 5 | Malika | 95 | ||||
| 6 | Sardor | 81 | ||||
| 7 |
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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Student | Score | Name: | Javohir | ||
| 2 | Aziz | 88 | Position: | |||
| 3 | Dilnoza | 92 | ||||
| 4 | Javohir | 75 | ||||
| 5 |
2
Arguments: Lookup_value — E1; Lookup_array — the name column A2:A6; Match_type — 0. Never leave this last box empty.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Student | Score | Name: | Javohir | ||
| 2 | Aziz | 88 | Position: | |||
| 3 | Dilnoza | 92 | ||||
| 4 | Javohir | 75 | ||||
| 5 | Malika | 95 | ||||
| 6 | Sardor | 81 | ||||
| 7 |
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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Student | Score | Name: | Malika | ||
| 2 | Aziz | 88 | Position: | 4 | ||
| 3 | Dilnoza | 92 | ||||
| 4 | Javohir | 75 | ||||
| 5 | Malika | 95 | ||||
| 6 | Sardor | 81 | ||||
| 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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Limit, soum | Lookup | Type | Result | ||
| 2 | 0 | 750 000 | 1 | 3 | ||
| 3 | 100 000 | 500 000 | 0 | 3 | ||
| 4 | 500 000 | 750 000 | 0 | #N/A | ||
| 5 | 1 000 000 | |||||
| 6 | 5 000 000 | |||||
| 7 |
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.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Registered | Arrived | On the list? | ||
| 2 | Aziz | Malika | Yes | ||
| 3 | Dilnoza | Bekzod | No | ||
| 4 | Javohir | Aziz | Yes | ||
| 5 | Malika | Nodira | No | ||
| 6 | Sardor | ||||
| 7 |
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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Student | Score | Top score: | 95 | ||
| 2 | Aziz | 88 | Position: | 4 | ||
| 3 | Dilnoza | 92 | Whose: | Malika | ||
| 4 | Javohir | 75 | ||||
| 5 | Malika | 95 | ||||
| 6 | Sardor | 81 | ||||
| 7 |
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.
| 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 | Registered | Arrived | On the list? | Position | ||||||||||||||||||||
| 2 | Aziz | Malika | ||||||||||||||||||||||
| 3 | Dilnoza | Bekzod | ||||||||||||||||||||||
| 4 | Javohir | Aziz | ||||||||||||||||||||||
| 5 | Malika | Nodira | ||||||||||||||||||||||
| 6 | Sardor | |||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.