MATCH returns the position of a value in a list, not the value itself. To find where Priya sits in A2:A7, type =MATCH("Priya",A2:A7,0). Excel returns 3, because Priya is the third name in that range. The 0 asks for an exact match. Use the number on its own, or hand it to INDEX to fetch another value from the same row.
Functions
MATCH Excel: Syntax, Match Types and Examples
Try this now
| A | B | C | D | |
|---|---|---|---|---|
| 1 | 22 | |||
| 2 | 13 | |||
| 3 | 9 | |||
| 4 | 18 | |||
| 5 | 15 | |||
| 6 | 14 |
You are typing into B1. Refer to the cells that hold the data.
Ready to practice?
Apply what you just learned with interactive exercises.
This guide to MATCH in Excel covers the syntax, what MATCH returns, the three match types, wildcards, the checks that stop #N/A from spoiling a sheet, and where MATCH fits next to INDEX, XLOOKUP and FIND. Every example uses one small support-team sheet, so the results are easy to compare with your own.
TL;DR
- The pattern is =MATCH(lookup_value, lookup_array, [match_type]). The result is a position, counted from the first cell of the range.
- Type 0 as the third argument for an exact match. Leaving it off means match type 1, which assumes a sorted list.
- Match type 1 finds the largest value that is less than or equal to your lookup value in an ascending list. Match type -1 finds the smallest value that is greater than or equal to it in a descending list.
- Text lookups accept * and ? wildcards when the match type is 0.
- MATCH ignores capital letters and returns the first position when a value appears more than once.
- On its own MATCH is half a lookup. Pair it with INDEX to return a value.
Table of Contents
- The sample data used in every example
- MATCH syntax and arguments
- MATCH examples from simple to advanced
- What the match types do
- MATCH with INDEX
- MATCH vs XMATCH, VLOOKUP, XLOOKUP and FIND
- Which Excel versions have MATCH
- MATCH errors and how to fix them
- What learners get wrong
- A worked job: find the top agent and the right band
- Practice MATCH
- FAQ
- Sources
The sample data used in every example
You manage a small support team and track how many tickets each agent closed this week. Type this into a blank sheet starting at A1.
| Row | A | B | C | D |
| 1 | Agent | Tickets closed | Agent typed | |
| 2 | Zanele | 38 | Priya | |
| 3 | Kabelo | 52 | ||
| 4 | Priya | 45 | ||
| 5 | Johan | 61 | ||
| 6 | Naledi | 52 | ||
| 7 | Thabo | 29 |
The match-type examples use a second small sheet with parcel weight bands. It is printed in that section.
MATCH syntax and arguments
=MATCH(lookup_value, lookup_array, [match_type])
| Argument | Required | What it does |
| lookup_value | Yes | The value to find. A cell, a number, or text in quotes. |
| lookup_array | Yes | The single row or column to search. |
| match_type | No | 0 exact, 1 largest value not above the lookup value, -1 smallest value not below it. If left out, it is 1. |
Two habits make MATCH safer. Always type the third argument, so the match type is a decision and not a default. And remember that the range controls the count: the same name returns a different number from A2:A7 than from A1:A7.
MATCH examples from simple to advanced
How to find the position of a name in a list
The basic MATCH formula in Excel searches a list for an exact value:
=MATCH("Priya",A2:A7,0)
Zanele is position 1, Kabelo 2, Priya 3. The result is 3. MATCH ignores capitals, so =MATCH("priya",A2:A7,0) also returns 3.
How to use a cell as the lookup value
A real sheet reads the name from a cell rather than typing it into the formula. With Priya in D2:
=MATCH(D2,A2:A7,0)
This returns 3 as well, and it changes when you type another name in D2. The text in the cell has to match the list exactly, apart from capitals.
Why the position depends on where the range starts
Start the range one row higher, at the header, and the same name gets a different number:
=MATCH("Priya",A1:A7,0)
The result is 4, because the header "Agent" is now position 1. Neither formula is wrong. The position is relative to the first cell of the range, and it equals the sheet row only when the range starts at A1. This is a common reason a MATCH and INDEX pair returns the wrong row.
How to find the first position of a repeated value
Two agents closed 52 tickets. MATCH stops at the first one it finds:
=MATCH(52,B2:B7,0)
The result is 2, Kabelo, not Naledi in position 5. If you need the second match, MATCH on its own cannot give it. Search from the position after the first, or use FILTER to list every match. The FILTER guide shows how.
How to find a position with wildcards
With a match type of 0, a star stands for any run of characters and a question mark for exactly one. To find the agent whose name starts with "Na":
=MATCH("Na*",A2:A7,0)
That returns 5 for Naledi. A question mark replaces one letter, so this finds Kabelo even if you only remember the ending:
=MATCH("?abelo",A2:A7,0)
The result is 2. Wildcards only work on text and only with match type 0. Our wildcard characters guide lists the full set, including the tilde that lets you search for a real star.
How to find the position of the highest value
Combine MATCH with MAX to find where the largest number sits:
=MATCH(MAX(B2:B7),B2:B7,0)
MAX returns 61, and MATCH finds 61 in position 4, so the result is 4. Johan closed the most tickets. To return the name rather than the number, put the position inside INDEX:
=INDEX(A2:A7,MATCH(MAX(B2:B7),B2:B7,0))
That returns Johan. If two agents tied for the top score, you would get the first of them.
How to check whether a value exists
Because MATCH returns a number when it finds something and #N/A when it does not, you can turn it into a yes-or-no test. This answers "is Priya on the list?":
=ISNUMBER(MATCH("Priya",A2:A7,0))
The result is TRUE. For a friendly message in place of the error, use IFNA:
=IFNA(MATCH("Sipho",A2:A7,0),"not on team")
Sipho is not on the sheet, so the cell shows "not on team". IFNA only catches #N/A, so a typo in a function name still shows its own error.
How to find the first value above a limit
Which is the first agent who closed more than 50 tickets? Test the whole column and ask MATCH for the first TRUE:
=MATCH(TRUE,INDEX(B2:B7>50,0),0)
The comparison produces TRUE or FALSE for each row, and the first TRUE is Kabelo's 52, so the result is 2. The INDEX(...,0) wrapper lets this work in older versions of Excel without array entry.
How to match on two conditions
The same trick handles two criteria. Multiply the tests so a row is 1 only when both are true:
=MATCH(1,INDEX((A2:A7="Kabelo")*(B2:B7=52),0),0)
This finds the row where the agent is Kabelo and the tickets are 52, and returns 2. For cleaner two-condition lookups in current versions, see our XLOOKUP with multiple criteria page.
What the match types do
The third argument changes what MATCH is looking for. It is easy to skip.
| match_type | What it finds | List must be |
| 0 | The first value equal to the lookup value | Any order |
| 1 (or omitted) | The largest value that is less than or equal to the lookup value | Sorted ascending |
| -1 | The smallest value that is greater than or equal to the lookup value | Sorted descending |
The next sheet is a courier's weight bands, ascending in column A, and a descending list of credit tiers in column C. The parcel weight is in E2.
| Row | A | B | C | D | E |
| 1 | Weight from (kg) | Credit tiers (descending) | Parcel kg | ||
| 2 | 0 | 50 | 12 | ||
| 3 | 5 | 25 | |||
| 4 | 10 | 10 | |||
| 5 | 25 | 5 | |||
| 6 | 50 | 0 |
=MATCH(E2,A2:A6,1)
12 is between 10 and 25, so Excel returns the position of 10, which is 3. Leaving off the third argument gives the same result, =MATCH(E2,A2:A6), because the default is 1. A parcel of exactly 5 kg lands on its own band: =MATCH(5,A2:A6,1) returns 2. A parcel heavier than the last band returns the last position, so =MATCH(80,A2:A6,1) returns 5. And a value below the first entry has nowhere to land, so =MATCH(-1,A2:A6,1) returns #N/A.
For the descending list, match type -1 finds the smallest value that is still at least 12:
=MATCH(E2,C2:C6,-1)
The tiers are 50, 25, 10, 5, 0. The smallest one that is at or above 12 is 25, which sits in position 2, so the result is 2.
An exact match against these bands fails: =MATCH(E2,A2:A6,0) returns #N/A, because no band is exactly 12. That is the right tool for IDs and the wrong one for ranges.
The default of 1 is the trap. If you leave off the third argument on a lookup that should be exact, and the list is not sorted, Excel can return a wrong position or #N/A without telling you the match type was the problem.
MATCH with INDEX
MATCH finds a position. INDEX turns a position into a value. Together they make the lookup that has served Excel users for decades. To return the tickets for the agent named in D2:
=INDEX(B2:B7,MATCH(D2,A2:A7,0))
MATCH returns 3 for Priya, and INDEX returns the third item from B2:B7, which is 45. Both ranges have to start on the same row, or the position will point at the wrong person. The INDEX MATCH guide covers the pair in full, including two-way lookups, and the INDEX function guide explains the half that does the fetching.
MATCH vs XMATCH, VLOOKUP, XLOOKUP and FIND
| Function | What it returns | Use it when |
| MATCH | A position in a row or column | You need the position, or you pair it with INDEX |
| XMATCH | A position, with exact match as the default and a search direction option | You are on a current Excel and want fewer defaults to remember |
| VLOOKUP | A value from a column to the right | The table has the key first and the file must work in old versions |
| XLOOKUP | A value from any range | You are on a current Excel and want the value, not the position |
| FIND | The position of text inside one cell | You want a character position in a string, not a list position |
XMATCH, a newer function, takes the same first two arguments but matches exactly by default, so there is no third argument to forget. It belongs to the same family as XLOOKUP. When you do want the value rather than the position, VLOOKUP and XLOOKUP get there in one step. The lookup basics guide covers the older LOOKUP function.
Which Excel versions have MATCH
MATCH is in every desktop version of Excel, and in Excel for Microsoft 365, Excel for the web and Excel for Mac. A workbook that uses it opens correctly in older versions, which is one reason INDEX and MATCH remain popular for shared files. XMATCH is only in Microsoft 365, Excel 2021 and later, and Excel for the web.
MATCH errors and how to fix them
Every error here can be reproduced on the support-team sheet.
| Error | Cause | Fix |
| #N/A | The value is not in the list. A typo, a hidden space or the wrong data type is usually why. | Check spelling, wrap the lookup value in TRIM, and compare number and text types. |
| #N/A with a number | The number is typed as text in quotes, as in =MATCH("52",B2:B7,0). | Remove the quotes so both sides are numbers. |
| #N/A with match type 1 | The lookup value is smaller than the first item of the sorted list. | Add a lower starting band, or check the sort order. |
| #N/A, or a stray column of errors, from swapped arguments | The range comes first, as in =MATCH(A2:A7,"Priya",0). | Put the value first and the range second. |
| A position that looks wrong | The range starts above or below where you assumed, or the third argument was left off. | Check the first cell of the range. Type the match type. |
What learners get wrong
Between 26 September and 3 November 2026, learners made 3,425 first attempts across our MATCH Function lesson, and 70.6% were right. MATCH Practice logged 823 first attempts with 81.8% right. A first attempt is the first check of a screen in a page view, not a head count of people. Four patterns show up.
1. Giving the item when the answer is a position. On the screen asking what =MATCH("Banana", A1:A5, 0) returns, 70.4% of 365 first attempts were right. Learners typed "banana" 31 times, a3 20 times and the formula itself 22 times. The correct answer is 3, the position of Banana in the list. MATCH never returns the word and never returns a cell address.
2. Putting the answer in as the lookup value. On the screen that asked for a MATCH formula that would return 5, only 58.1% of 334 first attempts were right. The most common wrong answer, 17 times, was =match(5,a1:a5,0). The number 5 is the result you want, not the value to search for. The accepted answer searches for the value that sits in position 5: =match(1,a:a,0). The lookup value is what is in the cell. The result is where it is.
3. A missing or wrong match type. On the screen asking for the position of "Jaguar" in the whole column, only 51.6% of 91 first attempts were right, and =match("Jaguar",a:a) with no third argument was the most common wrong answer, 11 times. On a list that is not sorted, an omitted match type does not mean exact. The accepted form is =match("jaguar",a:a,0). The reverse also happened on the approximate-match screen, where =match(27,a:a,0) asked for an exact 27 and was typed 5 times, and =match("27",a:a,1), with quotes turning the number into text, was typed 4 times. On the lesson's match-type screens, only 43.5% of 361 first attempts were right on the screen for match type 1 and 55.9% of 356 on the screen for match type -1.
4. Reversed arguments and misspelled names. =match(a:a,4) and =match(a:a,"Jaguar") appeared 4 times each, with the range first. The value comes first, then the range. On the "Harpy Eagle" screen, "Happy Eagle" was typed 5 times. Exact match needs the exact spelling, so click the cell holding the name where you can.
A worked job: find the top agent and the right band
Your manager wants two things from the sheets above: who closed the most tickets this week, and which weight band a 12 kg parcel belongs in.
- Find the top performer's position. In F2 write =MATCH(MAX(B2:B7),B2:B7,0). The result is 4.
- Turn it into a name. In F3 write =INDEX(A2:A7,F2). The result is Johan. Keeping MATCH and INDEX in separate cells lets you see the position, which makes a wrong answer easy to trace.
- Handle ties on purpose. Naledi and Kabelo both have 52, so if 52 were the top score you would get Kabelo only. If the report must show every top agent, use FILTER and say so in the note under the table.
- Find the band. On the weight sheet, =MATCH(E2,A2:A6,1) returns 3. Wrap it in INDEX to read the band's price from a column beside the weights. For 12 kg the match type 1 picks the 10 kg band.
- Guard against bad input. Wrap each MATCH in IFNA with a clear message, so a missing agent shows "not on team" and a negative weight shows "check weight" instead of a bare error.
Practice MATCH
Positions are easy to misread until you have typed a few. The page already carries an exercise from Practice Lesson 21, so type the formula there rather than read on.
Then move on to Practice Lesson 83, which asks you to find positions in whole columns and to use approximate match with a lookup value. If a formula comes back wrong, compare it with the four patterns above before you retry.
FAQ
What does the MATCH function do in Excel?
MATCH searches a row or column for a value and returns its position in that range, not the value itself. For example, =MATCH("Priya",A2:A7,0) returns 3 because Priya is the third item. The position counts from the first cell of the range you give it. If the value is not found, MATCH returns #N/A.
What do match type 0, 1 and -1 mean?
Type 0 finds the first exact match, in any order. Type 1 finds the largest value that is less than or equal to your lookup value, and needs the list sorted ascending. Type -1 finds the smallest value that is greater than or equal to it, and needs the list sorted descending. If you leave the argument out, Excel uses 1.
Why does MATCH return #N/A?
The lookup value is not in the list exactly as typed. Check for a typo, a trailing space, or a number written as text in quotes. With match type 1, a value smaller than the first item also gives #N/A. TRIM removes spaces, and removing the quotes around a number fixes the data type.
What is the difference between MATCH and INDEX?
MATCH returns the position of an item in a list. INDEX returns the item at a given position. They do opposite jobs, so they are usually combined: =INDEX(B2:B7,MATCH(D2,A2:A7,0)) finds the position of the name in D2 and returns the matching ticket count. Alone, each one only does half of a lookup.
Can MATCH use wildcards?
Yes, when the match type is 0 and the lookup value is text. A star matches any number of characters and a question mark matches exactly one, so =MATCH("Na*",A2:A7,0) finds the first name starting with Na. To search for a real star or question mark, put a tilde in front of it.
Is MATCH case sensitive?
No. MATCH treats "priya", "Priya" and "PRIYA" as the same text, so =MATCH("priya",A2:A7,0) returns 3. If you need a case-sensitive position, combine EXACT with INDEX inside MATCH, which takes a longer formula than the plain function. For most lists, ignoring case is what you want anyway.
Sources
Keep going
Guides people read next.

SQL Data Types: Categories, Examples and How to Choose
SQL data types explained: numeric, text, date and time, Boolean and binary types, with examples, MySQL, SQL Server, Oracle and PostgreSQL differences, and how to choose.
15 min
WEEKDAY Function in Excel: Syntax, Examples and Day Names
Learn how the Excel WEEKDAY function works, which return_type to pick, how to get day names, flag weekends and fix errors, with copy-ready formulas.
15 min
CHOOSECOLS Function in Excel: Syntax, Examples, Fixes
Learn how the Excel CHOOSECOLS function works, with CHOOSEROWS too: syntax, negative indexes, FILTER combos, version support and fixes for #VALUE! and #SPILL!.
16 min