ExcelReady
CourseFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before the interview. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Function guides
  • Blog

Product

  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Lookups
  3. The MATCH Function in Excel

The MATCH Function in Excel

By ExcelReady Team·Updated October 30, 2026·6 min read

The short answer

MATCH finds a value in a row or column and returns its position, not the value itself. =MATCH("Marco",B2:B7,0) returns 4 if Marco is the 4th name in B2:B7. Always use 0 as the third argument for an exact match. MATCH is most useful inside INDEX, as =INDEX(A2:A7,MATCH(F2,B2:B7,0)), to look up in any direction.

Key takeaways

  • =MATCH(lookup_value, lookup_array, 0) returns the position of the first exact match.
  • The position counts from the start of the range you give it, not from row 1 of the sheet.
  • Match type 1 (the default) needs ascending data and finds the largest value less than or equal to yours; -1 needs descending data.
  • MATCH returns #N/A when there's no match; ISNUMBER(MATCH(...)) turns that into a yes/no check.
  • MATCH is not case-sensitive and accepts wildcards such as "Ma*" with match type 0.
On this page+
  1. What does MATCH do in Excel?
  2. How to use MATCH: find a position step by step
  3. Match types: 0, 1 and -1 explained
  4. How to use MATCH with INDEX
  5. How to make VLOOKUP's column number automatic with MATCH
  6. How to check if a value exists in a list
  7. MATCH with wildcards and case
  8. Why does MATCH return #N/A?
  9. Practise it

The Excel MATCH function tells you where a value is in a list: its position as a number, such as 4 for the fourth item. On its own that sounds modest, but MATCH is the engine behind INDEX MATCH, flexible VLOOKUPs and "is this value in my list?" checks. This guide is for beginners and covers the syntax, the three match types, and the most useful ways to combine MATCH with other functions.

What does MATCH do in Excel?#

MATCH searches a single row or column for a value and returns its position in that range.

Excel formula
=MATCH(lookup_value, lookup_array, [match_type])
ArgumentWhat it meansExample
lookup_valueThe value to findF2 (a name)
lookup_arrayOne row or one column to searchB2:B7
match_type0 exact, 1 less than or equal (default), -1 greater than or equal0

MATCH works in every version of Excel, on Windows, Mac and the web. If you need the value rather than its position, MATCH is half of the answer; INDEX is the other half.

How to use MATCH: find a position step by step#

Here is a small employee list:

ABCD
1IDNameDepartmentSalary
2E-201PriyaFinance52,000
3E-202TomSales47,000
4E-203AishaHR45,500
5E-204MarcoSales49,000
6E-205LenaFinance58,000
7E-206OmarIT61,000

F2 holds Marco. In G2, type:

Excel formula
=MATCH(F2,B2:B7,0)

The result is 4, because Marco is the 4th cell of B2:B7. Notice it's not 5, his row number on the sheet: MATCH counts from the first cell of the range you give it. If you select B1:B7 instead, the answer becomes 5, which can throw off any INDEX that uses it. Keep the MATCH range and the INDEX range starting on the same row.

MATCH also works across a row: =MATCH("Salary",A1:D1,0) returns 4, the column position of the Salary header.

Match types: 0, 1 and -1 explained#

The third argument decides how MATCH compares values. Use 0 unless you have a clear reason not to.

match_typeFindsData must be
0The first exact matchIn any order
1 or omittedThe largest value less than or equal to the lookup valueSorted ascending
-1The smallest value greater than or equal to the lookup valueSorted descending

Match type 1 is useful for bands and tiers. With commission thresholds 0, 10,000, 25,000 and 50,000 in A11:A14, =MATCH(30000,A11:A14,1) returns 3: 25,000 is the largest threshold that 30,000 reaches. Then =INDEX(B11:B14,MATCH(30000,A11:A14,1)) returns that tier's rate.

The danger: if you leave out the third argument, Excel uses 1. On unsorted names, that can return a wrong position with no error. Our comparison of MATCH type 0 vs 1 vs -1 goes through each case in detail.

How to use MATCH with INDEX#

INDEX returns the value at a position, and MATCH finds the position, so together they make a lookup.

Excel formula
=INDEX(A2:A7,MATCH(F2,B2:B7,0))

MATCH finds Marco at position 4, and INDEX returns the 4th ID: E-204. Unlike VLOOKUP, the return column (A) is to the left of the search column (B), which is why INDEX MATCH is the classic answer to looking up to the left. The INDEX MATCH guide covers it step by step.

Use two MATCH functions for a two-way lookup, one for the row and one for the column:

Excel formula
=INDEX(A2:D7,MATCH(F2,B2:B7,0),MATCH("Department",A1:D1,0))

This returns Sales, Marco's department. Change "Department" to "Salary" and you get 49,000, without editing anything else.

How to make VLOOKUP's column number automatic with MATCH#

VLOOKUP breaks when someone inserts a column, because its column number is typed in. MATCH can calculate it from the header instead:

Excel formula
=VLOOKUP(F2,B1:D7,MATCH("Salary",B1:D1,0),FALSE)

MATCH finds "Salary" in position 3 of B1:D1, which is exactly the column number VLOOKUP needs for the table B1:D7. The result is 49000. If a column is inserted, the header moves and MATCH updates the number automatically. Make sure the header range starts in the same column as the table.

How to check if a value exists in a list#

MATCH returns #N/A when it can't find the value. Wrap it in ISNUMBER to turn that into TRUE or FALSE:

Excel formula
=ISNUMBER(MATCH("Zoe",B2:B7,0))

This returns FALSE, because Zoe isn't on the list. Inside IF it becomes a label: =IF(ISNUMBER(MATCH(F2,B2:B7,0)),"Yes","No") returns Yes for Marco. This pattern is a common way to compare two lists, for example to flag which applicants are already employees.

MATCH with wildcards and case#

With match type 0, MATCH accepts the wildcards * (any characters) and ? (one character). =MATCH("Ma*",B2:B7,0) returns 4, the first name starting with "Ma". MATCH is not case-sensitive, so =MATCH("marco",B2:B7,0) also returns 4.

For a case-sensitive match, combine it with EXACT: =MATCH(TRUE,EXACT(B2:B7,F2),0). In Excel 2019 and earlier, confirm it with Ctrl+Shift+Enter.

Why does MATCH return #N/A?#

#N/A means MATCH didn't find the value. Check these in order:

  1. Typos or extra spaces: "Marco " with a trailing space won't match. Use TRIM to clean the data.
  2. Numbers stored as text: the number 1001 doesn't match the text "1001".
  3. The range misses the value: the list grew but the range didn't.
  4. Wrong match type: with 1 or -1 on unsorted data, MATCH can return #N/A or a wrong position.

To show a friendly message, wrap it: =IFERROR(MATCH(F2,B2:B7,0),"Not found").

In Excel 2021 and Microsoft 365, XMATCH defaults to exact match and can search from the bottom; see MATCH vs XMATCH. MATCH stays the safer choice for files that must open in older versions. MATCH also does the heavy lifting in lookups with multiple criteria, a favourite of Excel interview questions. The MATCH function guide has the full reference.

Practise it#

Try the live exercise on this page to find Marco's position. Then practise INDEX and MATCH in a live spreadsheet, where you'll use MATCH on its own, put it inside INDEX, and finish with a two-way lookup.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

In G2, use MATCH to find the position of the name in F2 within the Name column (B2:B7). Use 0 for an exact match.

fx
ABCDEFGH
1
ID
Name
Department
Salary
Name
Position
2
E-201
Priya
Finance
52000
Marco
3
E-202
Tom
Sales
47000
4
E-203
Aisha
HR
45500
5
E-204
Marco
Sales
49000
6
E-205
Lena
Finance
58000
7
E-206
Omar
IT
61000
8
9
10

Tip: What to find (F2), where to look (B2:B7), then 0 for exact match.

Practise this in a lesson

LessonINDEX and MATCHCombine INDEX and MATCH to look up in any direction, including returning a column to the left of the one you search.Function guideMATCHLearn how Excel's MATCH finds the position of a value, why the 0 matters, and how it powers INDEX/MATCH. Includes a live exercise.Function guideINDEXLearn the Excel INDEX function: return a value by row and column position, build two-way lookups with MATCH, and practice live.

Frequently asked questions

What does the MATCH function return?

+

MATCH returns a number: the position of the value in the range. =MATCH("Tom",B2:B7,0) returns 2 if Tom is in B3, the second cell of B2:B7.

What does the 0 mean in MATCH?

+

The 0 is match_type and means exact match. Without it, MATCH uses match type 1, which expects sorted data and can return the wrong position on unsorted lists.

Why does MATCH return #N/A?

+

The value isn't in the range. Common causes are typos, extra spaces, numbers stored as text, or a range that misses the row you need.

Is MATCH case-sensitive?

+

No. MATCH treats "marco" and "Marco" as the same value. For a case-sensitive match, use =MATCH(TRUE,EXACT(B2:B7,F2),0).

What is the difference between MATCH and XMATCH?

+

XMATCH, in Excel 2021 and Microsoft 365, defaults to an exact match and can search from the last item up. MATCH works in every version but defaults to approximate match.

Sources

  • MATCH function - Microsoft Support
  • INDEX function - Microsoft Support
  • XMATCH function - Microsoft Support

Written and checked by the ExcelReady Team. First published October 30, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does MATCH do in Excel?
  2. How to use MATCH: find a position step by step
  3. Match types: 0, 1 and -1 explained
  4. How to use MATCH with INDEX
  5. How to make VLOOKUP's column number automatic with MATCH
  6. How to check if a value exists in a list
  7. MATCH with wildcards and case
  8. Why does MATCH return #N/A?
  9. Practise it

Keep reading

Lookups· 6 min read

Lookup With Multiple Criteria in Excel

To look up a value that must match two or more criteria, multiply the tests and look up 1: =XLOOKUP(1,(A2:A8=F2)*(B2:B8=F3),C2:C8). Each test gives 1 for TRUE and 0 for FALSE, so only rows that pass every test become 1. In Excel 2019 and earlier, use =INDEX(C2:C8,MATCH(1,(A2:A8=F2)*(B2:B8=F3),0)) or a helper column.

Lookups· 6 min read

Return Every Match for a Lookup in Excel (FILTER)

VLOOKUP and XLOOKUP stop at the first match. To return every match, use FILTER: =FILTER(B2:B7,A2:A7=F2) lists all the orders for the customer in F2, spilling one per row. Add a third argument such as "No orders" for when nothing matches, and wrap it in TEXTJOIN to put all matches in one cell. FILTER needs Excel 2021 or Microsoft 365.

Tests & careers· 5 min read

25 Excel Interview Questions (With Answers You Can Practise)

Common Excel interview questions cover formulas and order of operations, relative and absolute ($) references, VLOOKUP, INDEX MATCH and XLOOKUP, IF with AND or OR, COUNTIFS and SUMIFS, pivot tables, filters and fixing errors. Good answers name the function, give its arguments in order and explain one limitation or edge case.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback. The first lessons are free, with no download.

Start learning for free