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.
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.
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.
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.
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.
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('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(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.
=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.
=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.
Match type 0 is the most commonly used option and the one you should specify in nearly every MATCH formula:
Match types 1 and -1 are used for approximate matching in sorted data โ most commonly for range lookups like tax brackets, grade boundaries, or tiered pricing:
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.
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.
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.
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.