MATCH Function in Excel: The Complete Guide with Real Examples

If you’ve ever needed to find where a value sits inside a list — not the value itself, but its position — the MATCH function in Excel is exactly what you need. It’s one of those functions that quietly does heavy lifting behind the scenes, and once you understand it, you’ll wonder how you ever worked without it.

What Is the MATCH Function in Excel?

The MATCH function searches for a specific value in a range of cells and returns the relative position of that value within the range. Think of it as asking Excel: “Where in this list does this value appear?” — and Excel replies with a number like 3, 7, or 12.

On its own, MATCH is very useful. But paired with INDEX or other functions, it becomes one of the most powerful lookup tools Excel has to offer. It works with both vertical columns and horizontal rows, which already gives it an edge over many alternatives.

Real-world analogy: Imagine a printed class roster. If you want to know what position “Sarah” is on the list, you run your finger down and count — she’s #4. MATCH does exactly that, only faster and with zero mistakes.

MATCH Function Syntax

=MATCH(lookup_value, lookup_array, [match_type])

Let’s break each argument down clearly:

Argument Required? What It Means
lookup_value Yes The value you want to find. Can be a number, text, logical value, or a cell reference.
lookup_array Yes The range of cells to search. Must be a single row or single column.
match_type No (default: 1) How to match: 0 = exact, 1 = less than or equal, -1 = greater than or equal.
Tip: Always explicitly write the match_type. Relying on the default (1) causes confusing results if your data isn’t sorted, and it’s easy to forget what the default is.

The 3 Match Types Explained

This is where many Excel users get tripped up. The match_type argument fundamentally changes how MATCH behaves:

match_type Behavior Array Must Be Sorted?
0 (Exact) Finds the first value that exactly equals lookup_value No — any order works
1 (Less Than) Finds the largest value that is less than or equal to lookup_value Yes — ascending order required
-1 (Greater Than) Finds the smallest value that is greater than or equal to lookup_value Yes — descending order required

Type 0 — Exact Match (Most Common)

This is the version you’ll use 90% of the time. Set match_type to 0 and Excel finds the first cell that exactly equals your lookup value. Order doesn’t matter.

Example 1: Find a Product’s Row Position

You have a list of products and want to know which row “Keyboard” is in.

Excel Spreadsheet
A B
1 Product Price
2 Monitor $299
3 Mouse $45
4 Keyboard $79
5 Webcam $120
7 Formula Result
8 =MATCH(“Keyboard”,A2:A5,0) 3

The formula returns 3 because “Keyboard” is the 3rd item in the range A2:A5. Note that it’s position within the range, not the actual row number.

Example 2: Match with a Cell Reference

Instead of hardcoding the search value, reference a cell — this makes your formula dynamic.

Excel Spreadsheet
A B C
1 City Search For: Position
2 New York Dubai =MATCH(B2,A2:A6,0)
3 London 4
4 Paris
5 Dubai
6 Tokyo

Change the value in B2, and the MATCH formula updates instantly. Here it returns 4 because Dubai is the 4th item in A2:A6. This is the real power of dynamic referencing.

Example 3: MATCH in a Horizontal Row

MATCH works just as well across columns as it does down rows. Here we’re searching a header row to find which column “March” is in.

Excel Spreadsheet
A B C D E
1 Jan Feb Mar Apr May
3 Formula Result
4 =MATCH(“Mar”,A1:E1,0) 3

Type 1 — Less Than or Equal (Approximate Match Ascending)

With match_type set to 1, MATCH finds the largest value that is still less than or equal to your lookup value. This is perfect for tiered systems — tax brackets, shipping rates, discount tiers, grading scales, and so on.

Important: The lookup array must be sorted in ascending order for this to work correctly.

Example 4: Grade Calculator

Given a student’s score, find which grade bracket they fall into.

Excel Spreadsheet
A B C D
1 Min Score Grade Student Score Position
2 0 F 73 =MATCH(C2,A2:A6,1)
3 60 D 3
4 70 C
5 80 B
6 90 A

A score of 73 returns position 3, pointing to the “70” bracket (Grade C). You’d then use INDEX to pull the actual grade letter — covered below.

Example 5: Shipping Rate Tiers

Excel Spreadsheet
A B C D
1 Order Value ($) Shipping Fee My Order Bracket Position
2 0 $9.99 $85 =MATCH(C2,A2:A5,1)
3 50 $5.99 2
4 100 $2.99
5 200 FREE

An order of $85 falls in tier 2 (the $50 bracket), which means $5.99 shipping. Pair this with INDEX to return the actual fee automatically.


Type -1 — Greater Than or Equal (Approximate Match Descending)

Match type -1 is the mirror of type 1. It finds the smallest value that is still greater than or equal to your lookup value. The array must be sorted in descending order.

This is less commonly used, but handy for systems where you work from high to low — like SLA tiers, priority queues, or performance benchmarks.

Example 6: SLA Response Time Tiers

Excel Spreadsheet
A B C D
1 Max Response Time (Hours) Support Promise Actual Response Position
2 24 Standard 5 =MATCH(C2,A2:A5,-1)
3 12 Priority 2
4 4 Urgent
5 1 Critical

With an actual response time of 5 hours, MATCH returns position 2. In the descending list 24, 12, 4, 1, the smallest value that is still greater than or equal to 5 is 12, so Excel points to the second item. Pair it with INDEX and you can return the actual promise level: Priority.

Practical tip: For most real-world tiered lookups, Type 1 with ascending data is more intuitive. Use Type -1 only when your business logic naturally runs from large to small.

INDEX + MATCH: The Power Combination

MATCH alone returns a position number. That’s useful, but what you usually want is the actual value at that position. That’s where INDEX comes in. This combo is often called the best lookup formula in Excel — more flexible than VLOOKUP and more intuitive than complex alternatives.

=INDEX(return_range, MATCH(lookup_value, lookup_array, 0))

Here’s how it works: MATCH finds the row number, INDEX uses that number to pull the value from a different column.

Example 7: Look Up a Price by Product Name

Excel Spreadsheet
A B C D
1 Product Category Price
2 Laptop Electronics $1,299
3 Desk Chair Furniture $249
4 Standing Desk Furniture $599
5 Headphones Electronics $189
7 Look Up Formula Result
8 Standing Desk =INDEX(C2:C5,MATCH(A8,A2:A5,0)) $599

Example 8: INDEX MATCH — Look LEFT (Something VLOOKUP Can’t Do)

One of VLOOKUP’s biggest limitations is it can only look to the right. INDEX + MATCH has no such restriction. Here we look up a department and return the employee name from the column on the LEFT.

Excel Spreadsheet
A B C D
1 Employee ID Name Department
2 E-1001 Ahmed Al-Sayed Finance
3 E-1002 Sarah Johnson Marketing
4 E-1003 James Park Engineering
5 E-1004 Priya Nair HR
7 Find Name for Dept: =INDEX(B2:B5,MATCH(“Engineering”,C2:C5,0)) James Park

We searched in column C (Department) and returned from column B (Name) — that’s a left-lookup that VLOOKUP simply cannot perform.


Two-Way Lookup with MATCH

Need to look up a value by both a row and a column simultaneously? Use two MATCH functions inside one INDEX formula — one for the row, one for the column. This is incredibly useful for matrix-style data like sales tables, schedules, and pricing grids.

=INDEX(data_range, MATCH(row_lookup, row_headers, 0), MATCH(col_lookup, col_headers, 0))

Example 9: Sales Data by Region and Month

Excel Spreadsheet
A B C D
1 Region Jan Feb Mar
2 North $12,000 $15,000 $11,000
3 South $9,500 $18,200 $14,000
4 East $7,800 $8,400 $9,200
6 Find: South Feb
7 Formula: =INDEX(B2:D4, MATCH(B6,A2:A4,0), MATCH(C6,B1:D1,0)) $18,200

Change B6 to “East” and C6 to “Mar” — the formula instantly returns $9,200. No manual lookup needed, ever.


Wildcard MATCH — Partial Text Matching

When you don’t know the exact value but know part of it, MATCH supports wildcard characters. This only works with match_type 0 (exact match mode, but with wildcards).

  • * — matches any number of characters
  • ? — matches any single character
  • ~ — escapes a literal * or ? character

Example 10: Find a Name You Only Partially Know

Excel Spreadsheet
A B
1 Customer Name Account #
2 Al-Farsi Trading LLC ACC-001
3 Arabian Gulf Supplies ACC-002
4 Blue Diamond Co. ACC-003
6 Wildcard Formula Position
7 =MATCH(“Arabian*”,A2:A4,0) 2
8 =MATCH(“*Diamond*”,A2:A4,0) 3
Tip: Wildcards are case-insensitive. “arabian*” and “ARABIAN*” will return the same result.

MATCH with Multiple Criteria

MATCH by itself handles one criteria. But you can combine it with array formulas or helper columns to match on multiple columns at once. The classic approach uses a concatenated array formula (enter with Ctrl+Shift+Enter in older Excel, or just Enter in Excel 365).

=MATCH(1, (range1=val1)*(range2=val2), 0)

This creates an array of 1s and 0s — the product is 1 only where BOTH conditions are true — and then MATCH finds the first 1.

Example 11: Find Employee by Name AND Department

Excel Spreadsheet
A B C
1 Name Department Salary
2 Maria Santos Sales $52,000
3 Maria Santos Marketing $58,000
4 Maria Santos Engineering $74,000
6 =INDEX(C2:C4, MATCH(1,(A2:A4=”Maria Santos”)*(B2:B4=”Engineering”),0))
7 Result $74,000
In Excel 365/2021: Enter as a normal formula. In Excel 2019 and older, press Ctrl+Shift+Enter to enter as an array formula — Excel will add curly braces { } around it automatically.

MATCH vs VLOOKUP vs XLOOKUP

A fair question is: why use MATCH at all when VLOOKUP and XLOOKUP exist? The answer is nuance — each tool has a job it does best.

Feature MATCH + INDEX VLOOKUP XLOOKUP
Look up left of search column ✅ Yes ❌ No ✅ Yes
Two-way (row & column) lookup ✅ Yes (2 MATCHes) ❌ No ⚠️ Requires nesting
Works in older Excel versions ✅ Yes (all versions) ✅ Yes ❌ Only 365/2021+
Returns position number ✅ Yes (MATCH alone) ❌ No ❌ No
Multiple criteria (native) ✅ Array formula ❌ No ✅ Yes
Ease of use Medium Easy Easy

The bottom line: use XLOOKUP if you’re on a modern version of Excel and just need a simple lookup. Use INDEX + MATCH when you need backward compatibility, two-way lookups, or positional logic. Use MATCH alone when you specifically need to know where something is, not what it is.


Common MATCH Errors and How to Fix Them

Error Cause Fix
#N/A Value not found in the array Check spelling, trailing spaces, data type mismatch (text vs number). Wrap with IFERROR: =IFERROR(MATCH(...), "Not Found")
#N/A or unreliable result (Type 1) The lookup value is below the first sorted value, or the array is not sorted ascending Sort your lookup array in ascending order before using match_type 1, or use 0 for an exact match
Wrong position returned Using match_type 1 or -1 on unsorted data Always use match_type 0 for unsorted data
Returns first match only MATCH only returns the first occurrence Use a helper column or AGGREGATE/SMALL workaround for multiple matches
#N/A or formula error lookup_array is not a single row or single column Make sure your lookup array is one-dimensional: one row OR one column, not a full two-way table

IFERROR Wrapper — Always a Good Practice

=IFERROR(MATCH(A2, B2:B100, 0), “Not in list”)

This way, instead of an ugly #N/A error, your users see a friendly message. Clean, professional, and much easier to troubleshoot.


Quick-Reference: MATCH Function Cheat Sheet

Use Case Formula Pattern Notes
Find exact position =MATCH(val, range, 0) Most common use
Tiered value (ascending) =MATCH(val, range, 1) Array must be sorted ↑
Tiered value (descending) =MATCH(val, range, -1) Array must be sorted ↓
Look up value (INDEX+MATCH) =INDEX(ret_range, MATCH(val, range, 0)) Better than VLOOKUP
Two-way lookup =INDEX(data, MATCH(r,rows,0), MATCH(c,cols,0)) Row + column lookup
Partial text match =MATCH(“text*”, range, 0) Use * or ? wildcards
Multiple criteria =MATCH(1,(r1=v1)*(r2=v2),0) Array formula (Ctrl+Shift+Enter)
Handle not-found error =IFERROR(MATCH(val,range,0),”N/A”) Always wrap in production

Frequently Asked Questions

Q: Does MATCH work with dates?
Yes. Excel stores dates as numbers internally, so MATCH handles them naturally. Just make sure your date formats are consistent — mixing text-formatted dates with real dates will cause #N/A errors.
Q: Is MATCH case-sensitive?
No, standard MATCH is not case-sensitive. “apple”, “Apple”, and “APPLE” are treated as identical. If you need case-sensitive matching, use a more complex array formula with EXACT.
Q: Can MATCH return multiple results?
No — MATCH always returns only the first match. For multiple results, you would need to use a different approach involving SMALL, AGGREGATE, or the newer FILTER function available in Excel 365.
Q: What is the difference between MATCH and FIND?
They solve completely different problems. MATCH finds a value’s position within a range of cells. FIND finds a character’s position within a text string. They are not interchangeable.
Q: Should I use MATCH or XLOOKUP?
If you’re on Excel 365 or Excel 2021 and just need a straightforward lookup, XLOOKUP is cleaner. But if you need positional logic, two-way lookups, or backward compatibility with Excel 2016/2019, INDEX + MATCH is the right choice.
Q: Why does my MATCH return the wrong row?
The most common reason is using match_type 1 on unsorted data, or having accidental spaces in your data. Run TRIM() on your lookup range and make sure match_type is explicitly set to 0 for exact matching.

Final Thoughts

The MATCH function in Excel is one of those tools that quietly earns its place in every serious spreadsheet. It doesn’t dazzle at first glance — it just tells you a number. But that number unlocks the ability to build dynamic, flexible, bulletproof lookup formulas that hold up as your data grows and changes.

Start simple: use MATCH with type 0 to confirm a value exists and find its position. Then graduate to INDEX + MATCH for flexible lookups. Eventually you’ll find yourself reaching for two-way lookups, wildcard searches, and multi-criteria arrays — and wondering how any spreadsheet ever ran without them.

The more you use it, the more situations you’ll find where MATCH is exactly the right tool for the job. It’s not flashy. It’s reliable. And in Excel, reliability is everything.