Excel MATCH Function: Syntax, Examples, and Practical Uses

Learn the Excel MATCH function to find the position of a value in a range. Syntax, examples with INDEX-MATCH, and when to use MATCH instead of VLOOKUP.

Excel MATCH Function: Syntax, Examples, and Practical Uses

What Is the MATCH Function in Excel?

If you've ever needed to find where a specific value sits in a list — which row a product name appears on, what position a score occupies in a ranking, or whether a value exists in a range at all — the MATCH function is the tool designed for exactly this purpose. It's one of Excel's foundational lookup functions, and while it works quietly behind the scenes in most formulas, understanding it unlocks the INDEX-MATCH combination that experienced Excel users consider essential.

The MATCH function in Excel searches for a specified value in a range of cells and returns the relative position (row or column number) of that value within the range. It doesn't return the value itself — it returns where the value is located. If you search for 'Apple' in a list and it's the third item, MATCH returns 3. If you search for the number 500 in a column and it's in the seventh row of the range, MATCH returns 7.

On its own, knowing a position number isn't always useful. But MATCH becomes extremely powerful when combined with INDEX — another function that retrieves a value from a specific position. The INDEX-MATCH combination is widely considered the best lookup method in Excel, more flexible and reliable than VLOOKUP for most scenarios. Learning MATCH is essentially learning half of Excel's most important lookup formula.

MATCH is also used independently for tasks like checking whether a value exists in a list (if MATCH doesn't find it, it returns an error), determining the rank or position of a value in a sorted dataset, and building dynamic references in advanced formulas. Understanding MATCH at a practical level — what it does, how the three match types work, and how to combine it with INDEX — unlocks a category of Excel formulas that many users never explore because VLOOKUP feels 'good enough.'

The reality is that VLOOKUP has significant limitations that MATCH doesn't share. VLOOKUP can only look to the right (the lookup column must be the leftmost column in the range). VLOOKUP breaks when columns are inserted or deleted. VLOOKUP requires you to count columns to specify which data to return. INDEX-MATCH avoids all of these problems — and MATCH is the key to making it work. This guide covers MATCH syntax, match types, practical examples, and how to build INDEX-MATCH formulas from scratch.

  • Syntax: =MATCH(lookup_value, lookup_array, match_type)
  • Returns: The relative position (number) of a value in a range — NOT the value itself
  • match_type 0: Exact match — finds the exact lookup_value. Returns #N/A if not found. Most common option
  • match_type 1: Largest value less than or equal to lookup_value (requires ascending sort). Default if omitted
  • match_type -1: Smallest value greater than or equal to lookup_value (requires descending sort)
  • Combined with INDEX: =INDEX(return_range, MATCH(lookup_value, lookup_range, 0)) — the most powerful lookup formula in Excel
  • Error handling: Wrap in IFERROR to handle #N/A when the value isn't found: =IFERROR(MATCH(...), 'Not Found')

How MATCH Works: Step by Step

book

Step 1: Specify What You're Searching For (lookup_value)

The first argument is the value MATCH looks for in the range. This can be a number, text string, cell reference, or the result of another formula. For example, =MATCH('Apple', A2:A10, 0) searches for the text 'Apple'. =MATCH(B1, A2:A10, 0) searches for whatever value is in cell B1. The lookup_value must match the data type in the range — text matches text, numbers match numbers.
rows

Step 2: Define Where to Search (lookup_array)

The second argument is the one-dimensional range (single row or single column) that MATCH searches through. For example, A2:A10 searches down column A from row 2 to row 10. B1:Z1 searches across row 1 from column B to column Z. The lookup_array must be a single row or column — MATCH doesn't search two-dimensional ranges. This range is where MATCH counts from to return the position number.
star

Step 3: Choose the Match Type (match_type)

The third argument tells MATCH how to compare values. Use 0 for exact match (the most common — finds the precise value or returns an error). Use 1 for approximate match ascending (finds the largest value less than or equal — requires the range to be sorted ascending). Use -1 for approximate match descending (finds the smallest value greater than or equal — requires descending sort). If you omit this argument, MATCH defaults to 1 (approximate ascending), which catches many users off guard — always specify 0 for exact matches.
check

Step 4: Interpret the Result

MATCH returns a number representing the position of the found value within the lookup_array. If your range is A2:A10 and the match is in A5, MATCH returns 4 (because A5 is the 4th cell in the range A2:A10, not the 5th row of the spreadsheet). This relative position is what INDEX uses to retrieve the corresponding value from another range. If no match is found with match_type 0, MATCH returns #N/A.
Microsoft Excel - Microsoft Excel certification study resource

INDEX-MATCH: The Most Powerful Lookup in Excel

The reason most people learn MATCH is to use it with INDEX — and the INDEX-MATCH combination is genuinely the most flexible and reliable lookup formula in Excel. Understanding how they work together is the practical payoff of learning MATCH.

INDEX returns a value from a specific position in a range. =INDEX(B2:B10, 4) returns the value in the 4th cell of the range B2:B10 (which is cell B5). On its own, INDEX requires you to know the position number — which you usually don't. That's where MATCH comes in: it finds the position dynamically.

The combined formula =INDEX(B2:B10, MATCH('Apple', A2:A10, 0)) works like this: MATCH searches for 'Apple' in A2:A10 and returns its position (say, 4). INDEX then uses that position to return the 4th value from B2:B10. The result is the value in column B that corresponds to 'Apple' in column A — exactly what VLOOKUP does, but without VLOOKUP's limitations.

Why INDEX-MATCH is better than VLOOKUP: you can look in any direction (left, right, up, down — VLOOKUP can only look right). The formula doesn't break when columns are inserted or deleted (because it references specific ranges, not column numbers). You can use separate ranges for the lookup column and the return column (they don't need to be part of the same contiguous range). And INDEX-MATCH is slightly faster on very large datasets because it only processes the specific columns referenced rather than the entire table array.

The syntax pattern is always the same: =INDEX(range_with_answers, MATCH(what_you're_looking_for, range_to_search_in, 0)). Once you've used it a few times, it becomes as natural as VLOOKUP — and you'll wonder why anyone uses VLOOKUP for anything except the simplest lookups.

A practical tip: when building your first INDEX-MATCH formulas, build the MATCH part first. Type =MATCH('Apple', A2:A10, 0) and verify it returns the correct position number. Then wrap it in INDEX: =INDEX(B2:B10, [your MATCH formula]). Building the formula in two steps instead of one makes errors easier to catch — if the final result is wrong, you can immediately check whether the MATCH or the INDEX is the source of the problem.

MATCH Function Examples

Basic Exact Match

=MATCH('Laptop', A2:A20, 0) — searches for 'Laptop' in cells A2 through A20 and returns the relative position. If 'Laptop' is in A7 (the 6th cell of the range starting at A2), MATCH returns 6. If 'Laptop' doesn't exist in the range, MATCH returns #N/A. The 0 at the end specifies exact match — this is the match type you'll use in the vast majority of MATCH formulas.

INDEX-MATCH Lookup

=INDEX(C2:C20, MATCH('Laptop', A2:A20, 0)) — finds the position of 'Laptop' in column A, then returns the corresponding value from column C. This is equivalent to a VLOOKUP that searches column A and returns column C, but it works regardless of the column order and doesn't break when columns are rearranged. To return values from a different column, change the INDEX range — the MATCH part stays the same.

Check If a Value Exists

=ISNUMBER(MATCH('Laptop', A2:A20, 0)) — returns TRUE if 'Laptop' exists in the range, FALSE if it doesn't. Since MATCH returns a number when it finds a match and #N/A when it doesn't, wrapping it in ISNUMBER converts the result to a simple TRUE/FALSE. This is a cleaner existence check than COUNTIF for some use cases, particularly when you're already building a formula that uses MATCH elsewhere.

Two-Way Lookup (MATCH in Two Directions)

=INDEX(B2:F20, MATCH('Laptop', A2:A20, 0), MATCH('March', B1:F1, 0)) — looks up 'Laptop' in the row headers (column A) and 'March' in the column headers (row 1), then returns the value at the intersection. This two-dimensional lookup uses MATCH twice: once for the row position and once for the column position. This is something VLOOKUP simply can't do — it's one of INDEX-MATCH's most powerful applications.

Understanding Match Types (0, 1, -1)

Match type 0 is the most commonly used option and the one you should specify in nearly every MATCH formula:

  • What it does: Finds the exact lookup_value in the lookup_array. The value must match precisely — 'Apple' matches 'Apple' but not 'apple' or 'Apples'
  • Sort requirement: None — the range does NOT need to be sorted
  • If not found: Returns #N/A error
  • When to use: Any time you're looking for a specific value — product name, employee ID, customer number, category label. This covers 90%+ of real-world MATCH use cases
  • Important: If you omit the match_type argument entirely, MATCH defaults to 1 (approximate ascending), NOT 0. Always type ,0) explicitly to get exact match behaviour
Excel Spreadsheet - Microsoft Excel certification study resource

Common MATCH Function Errors and How to Fix Them

MATCH formulas that don't work usually fail for one of a few predictable reasons. Knowing what causes each error makes troubleshooting fast.

#N/A is the error you see when MATCH can't find the lookup_value in the lookup_array with match_type 0 (exact match). This means the value genuinely doesn't exist in the range — or it exists but in a different format.

Common format mismatches: the lookup_value is a number but the range contains numbers stored as text (or vice versa), there's extra whitespace in the data (use TRIM to clean it), or the case doesn't match for text values (MATCH with type 0 is case-insensitive for text, but if you're matching against a formula that produced a different result, check the output carefully).

Getting the wrong position number without any error usually means you're using match_type 1 (the default) when you intended match_type 0. Because type 1 returns the nearest smaller value instead of requiring an exact match, it can return a result that seems plausible but is wrong. Always specify ,0) for exact matches to avoid this subtle error.

MATCH returning results from the wrong row or column happens when the lookup_array and the INDEX return_range aren't the same size. If your MATCH range is A2:A100 but your INDEX range is B1:B100, the positions are off by one row — MATCH position 1 points to B1 instead of B2. Both ranges must start at the same row (for column lookups) or the same column (for row lookups) and be the same length.

Wildcards work with MATCH type 0 for partial text matching. Use * (asterisk) for any number of characters and ? (question mark) for a single character. =MATCH('App*', A2:A10, 0) matches 'Apple,' 'Application,' or anything starting with 'App.' This is useful when you know the beginning of a value but not the exact full text. However, wildcards only work with text — they don't apply to numeric lookups.

If you need to match a literal asterisk or question mark (as data rather than a wildcard), precede it with a tilde (~): =MATCH('~*', A2:A10, 0) searches for an actual asterisk character. This edge case is rare but important to know about if your data contains these special characters as actual data values rather than as wildcard search operator symbols instead.

MATCH Function Best Practices

  • Always specify match_type 0 for exact matches — the default (type 1) is approximate match, which returns wrong results when the exact value doesn't exist
  • Use absolute references ($A$2:$A$100) for the lookup_array when copying the formula — this prevents the range from shifting and producing incorrect matches
  • Wrap MATCH in IFERROR when #N/A errors are possible: =IFERROR(INDEX(..., MATCH(..., 0)), 'Not Found') prevents error displays in your results
  • Verify that your lookup_array and INDEX return_range are the same size and start at the same row — mismatched ranges produce off-by-one errors
  • Clean your data before using MATCH — use TRIM() to remove whitespace and VALUE() to convert text-formatted numbers to actual numbers
  • For case-sensitive matching, use MATCH with EXACT inside an array formula — standard MATCH is case-insensitive for text values
  • Consider XLOOKUP (available in Excel 365 and Excel 2021) as a simpler alternative to INDEX-MATCH for basic lookups — it combines both functions into one

INDEX-MATCH vs VLOOKUP: When to Use Each

Pros
  • +INDEX-MATCH can look in any direction — left, right, up, or down. VLOOKUP can only look to the right of the search column, which forces you to restructure data when the return column is to the left
  • +INDEX-MATCH doesn't break when columns are inserted or deleted — it references specific ranges rather than column position numbers, making formulas more robust in shared or evolving workbooks
  • +INDEX-MATCH handles two-dimensional lookups (searching both row and column headers) — VLOOKUP can only search one dimension without additional helper formulas
  • +VLOOKUP is simpler to write for basic lookups — =VLOOKUP(value, range, column_number, FALSE) is more intuitive for beginners than the INDEX-MATCH pattern
Cons
  • INDEX-MATCH has a steeper learning curve — understanding how MATCH returns a position and INDEX uses that position requires more conceptual understanding than VLOOKUP's straightforward syntax
  • VLOOKUP is more widely known — when sharing workbooks with colleagues, VLOOKUP formulas are more likely to be understood without explanation
  • For simple left-to-right lookups in stable worksheets, VLOOKUP and INDEX-MATCH produce identical results — the advantages of INDEX-MATCH only matter when you need left-lookups, column stability, or two-dimensional searches
  • XLOOKUP (Excel 365+) makes the INDEX-MATCH vs VLOOKUP debate less relevant — XLOOKUP offers INDEX-MATCH's flexibility with VLOOKUP's simplicity in a single function
Excellence Playa Mujeres - Microsoft Excel certification study resource

Advanced MATCH Techniques

Beyond basic exact matching, MATCH supports several advanced techniques that handle more complex lookup scenarios.

Case-sensitive MATCH requires an array formula approach because standard MATCH is case-insensitive. The formula =MATCH(TRUE, EXACT(A2:A100, 'apple'), 0) uses the EXACT function (which IS case-sensitive) inside MATCH. In older Excel versions, this must be entered with Ctrl+Shift+Enter as an array formula. In Excel 365 with dynamic arrays, it works with a normal Enter. This technique is useful when your data contains values like 'US' and 'us' that need to be distinguished.

MATCH with multiple criteria uses concatenation to create a compound lookup key. If you need to find a row where column A is 'Sales' AND column B is 'Q1,' create a helper column with =A2&B2 (resulting in 'SalesQ1'), then use MATCH to search the helper column: =MATCH('SalesQ1', HelperColumn, 0). Alternatively, in Excel 365, the array formula =MATCH(1, (A2:A100='Sales')*(B2:B100='Q1'), 0) finds the position where both conditions are met simultaneously without a helper column.

MATCH with INDIRECT creates dynamic range references. =MATCH(lookup_value, INDIRECT('Sheet2!A2:A100'), 0) lets you change the sheet name or range reference dynamically by storing it in a cell. This is useful for workbooks with multiple data sheets where you want the same formula to look up values from different sheets based on a dropdown selection. Combine with INDEX for a fully dynamic cross-sheet lookup.

The XMATCH function (Excel 365) extends MATCH with additional capabilities: search from bottom to top (finding the last occurrence rather than the first), binary search mode for faster performance on large sorted datasets, and wildcard matching built directly into the function syntax. If you're on Excel 365, XMATCH is worth learning as the modern replacement for MATCH — though MATCH remains necessary for compatibility with older Excel versions and for workbooks shared with users who may not have Excel 365.

Nested MATCH functions enable sophisticated lookups where the search criteria itself comes from another MATCH result. For example, you can use one MATCH to find which column to search in, and another MATCH to find the row within that column — creating fully dynamic lookup structures that adapt to changing data layouts without formula modification.

MATCH Function: Quick Numbers

3 argumentsMATCH takes three arguments: lookup_value (what to find), lookup_array (where to search), and match_type (how to match: 0=exact, 1=approximate ascending, -1=approximate descending)
Position #MATCH returns a position number — not the value itself. The position is relative to the start of the lookup_array, not the row number of the worksheet
match_type 0Always specify 0 for exact match — the default (type 1) is approximate match, which returns wrong results for most lookup scenarios if the exact value isn't found
INDEX-MATCHThe most powerful lookup combination in Excel — INDEX retrieves a value from a position, MATCH provides that position dynamically. Replaces VLOOKUP with greater flexibility
#N/AThe error MATCH returns when the lookup_value isn't found with match_type 0 — wrap in IFERROR to display a custom message instead of the error
XLOOKUPModern replacement for INDEX-MATCH available in Excel 365 — combines both functions into one with simpler syntax. Use MATCH for compatibility with older Excel versions

When to Use MATCH vs Other Lookup Functions

Excel offers several lookup functions, and choosing the right one for each situation prevents unnecessary complexity. Here's when MATCH is the right choice and when alternatives serve you better.

Use MATCH (with INDEX) when you need to look up values to the left of the search column, when your worksheet structure changes frequently (columns being added or removed), when you need a two-dimensional lookup (searching both rows and columns), or when performance matters on very large datasets. INDEX-MATCH is the most versatile lookup method and works correctly in every scenario that VLOOKUP handles, plus scenarios where VLOOKUP fails.

Use VLOOKUP for simple, straightforward lookups where the search column is to the left of the return column and the worksheet structure is stable. VLOOKUP's simpler syntax makes it faster to write and easier for other users to understand. For quick ad hoc lookups where formula robustness isn't a concern, VLOOKUP is perfectly adequate.

Use XLOOKUP (Excel 365 and Excel 2021 only) as a modern replacement for both VLOOKUP and INDEX-MATCH. XLOOKUP searches in any direction, returns #N/A by default for exact matches (not approximate like VLOOKUP), and doesn't require a separate INDEX function. If everyone who uses your workbook has Excel 365, XLOOKUP is the cleanest option for new formulas. For workbooks shared with users on older Excel versions, stick with INDEX-MATCH or VLOOKUP for compatibility.

Use MATCH alone (without INDEX) when you need the position of a value rather than a corresponding value from another column — for example, determining the rank of an item in a list, checking whether a value exists in a range, or building a position number for use in other functions like OFFSET or INDIRECT. MATCH's position-finding capability is useful in formula contexts beyond just lookups.

One scenario worth mentioning: if you're building a spreadsheet that other people will use and maintain, INDEX-MATCH is more maintainable than VLOOKUP because it explicitly references the ranges involved. A VLOOKUP formula with the number 7 as the column argument requires someone to count columns to understand what data it's returning. INDEX-MATCH with named ranges like =INDEX(Prices, MATCH(ProductID, ProductList, 0)) is self-documenting — anyone reading the formula immediately understands what it does without counting anything.

MATCH Function in Real-World Scenarios

Understanding how MATCH applies to actual work scenarios makes the function feel less abstract and more immediately useful.

In financial modelling, MATCH is used to create dynamic references to specific time periods. If your model has months across the top row (Jan, Feb, Mar...) and you want a formula that always references the current month's column, =MATCH(TEXT(TODAY(),'mmm'), B1:M1, 0) finds the current month's position in the header row. Combined with INDEX, this creates formulas that automatically adjust to the current month without manual column reference updates.

In inventory management, INDEX-MATCH looks up product prices, stock levels, and reorder points from a product master list. =INDEX(PriceColumn, MATCH(ScannedBarcode, BarcodeColumn, 0)) retrieves the price for a scanned barcode instantly. Unlike VLOOKUP, this works regardless of where the price column sits relative to the barcode column — the two columns don't even need to be in the same contiguous range.

In HR and payroll, MATCH with approximate matching (type 1) determines which salary band or tax bracket applies to a given salary. If tax brackets are listed in ascending order (0, 10000, 40000, 85000), =MATCH(Employee_Salary, Tax_Brackets, 1) returns the position of the highest bracket that the salary exceeds, which INDEX then uses to retrieve the applicable tax rate. This is one of the few legitimate uses for match_type 1 — range-based lookups where you want the nearest lower boundary.

In data validation and quality checking, =ISNUMBER(MATCH(A2, ValidList, 0)) checks whether each entry in a column exists in an approved list of valid values. Applied across a column, this formula flags invalid entries — useful for cleaning imported data, verifying product codes, or checking that form submissions contain only acceptable responses. When combined with conditional formatting — highlighting cells where ISNUMBER(MATCH(...)) returns FALSE — you create a visual data validation dashboard that instantly shows which entries in a column don't match your approved list, without requiring manual inspection of every row.

Excel MATCH Function Questions and Answers

About the Author

James R. HargroveJD, LLM

Attorney & Bar Exam Preparation Specialist

Yale Law School

James R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.