MATCH Function

Find value positions in Excel/Sheets with MATCH. Learn syntax, examples, errors, and combine with INDEX for powerful lookups.

ExcelExcel
Google SheetsGoogle Sheets
lookup
intermediate
Syntax Preview
ExcelExcelGoogle SheetsGoogle Sheets
=MATCH(lookup_value, lookup_array, [match_type])
Quick Answer
Comprehensive Explanation
Match Type Options Explained

Practical Examples

Basic Exact Match

Find the position of a product in a list

Result: 3

Finding Column Position for Dynamic References

Locate a column header position for use with INDEX

Result: 4

Grade Bracket Lookup with Approximate Match

Find the appropriate grade bracket for a test score

Result: 4

Two-Way Lookup with INDEX-MATCH

Combine MATCH with INDEX for powerful two-dimensional lookups

Result: $2,850

Checking Data Existence with Error Handling

Use MATCH to verify if a value exists in a list

Result: Not Found

Dynamic Range Selection with Descending Sort

Find position in a descending sorted list using match_type -1

Result: 3

Common Errors and Solutions

#N/A

MATCH cannot find the lookup value

Cause:

The lookup value doesn't exist in the lookup array, or there's a data type mismatch

Solution:

1. Verify the lookup value exists in the range 2. Check for extra spaces using TRIM() 3. Ensure data types match (numbers vs. text) 4. Use IFERROR for graceful error handling

Prevention:

Always validate data types and use exact match (0) when unsure about data sorting

Frequency: 40%

Example:

#VALUE!

MATCH receives incompatible argument types

Cause:

The lookup_array is not a single row or column, or match_type is not a valid number

Solution:

1. Ensure lookup_array is one-dimensional (single row or column) 2. Verify match_type is 1, 0, or -1 3. Check that the range doesn't include multiple rows and columns 4. Remove any merged cells from the lookup range

Prevention:

Always select a single row or column for the lookup_array parameter

Frequency: 25%

Example:

#REF!

MATCH references deleted or invalid cells

Cause:

The lookup_array references cells that have been deleted or moved

Solution:

1. Rebuild the formula with current cell references 2. Use named ranges for more stable references 3. Check for broken links to external workbooks 4. Ensure the referenced sheet still exists

Prevention:

Use structured references or named ranges that automatically adjust when data moves

Frequency: 15%

Example:

Wrong Result

MATCH returns unexpected position

Cause:

Incorrect match_type for the data structure, or data not properly sorted

Solution:

1. Use match_type 0 for unsorted data 2. Ensure data is sorted ascending for match_type 1 3. Ensure data is sorted descending for match_type -1 4. Check for hidden rows or filtered data affecting position count

Prevention:

Default to exact match (0) unless specifically needing approximate matching with sorted data

Frequency: 20%

Example:

Advanced Tips and Best Practices

MATCH + INDEX is more versatile than VLOOKUP because it can look left, right, up, or down. Use MATCH to find positions and INDEX to return values: =INDEX(return_range, MATCH(lookup_value, lookup_range, 0))

For large datasets (>10,000 rows), use match_type 1 or -1 with sorted data for binary search performance (100x faster). Sort your data and use approximate matching when exact values aren't required.

MATCH can only search one-dimensional arrays (single row or column). For two-dimensional searches, use two separate MATCH functions or consider using XLOOKUP in Excel 365.

MATCH is not case-sensitive by default. To perform case-sensitive matching, combine with EXACT function in an array formula: =MATCH(TRUE, EXACT(A2, B:B), 0)

Always wrap MATCH in IFERROR or IFNA when using in production spreadsheets to handle missing values gracefully: =IFERROR(MATCH(A2, B:B, 0), 0) or =IFNA(MATCH(A2, B:B, 0), "Not Found")

MATCH supports wildcards (* and ?) with match_type 0. Use * for any number of characters and ? for a single character: =MATCH("Widget*", A:A, 0) finds any cell starting with 'Widget'

MATCH vs Alternative Functions
Frequently Asked Questions

Need Help with MATCH Function?

Stop struggling with formula syntax. Use AskFormulas to generate validated formulas instantly with our AI-powered tool.

Example Excel formula:

Related Formulas

HLOOKUP Function

Master the HLOOKUP function for horizontal table searches in Excel and Sheets. Find values across rows with examples and error fixes.

intermediate
lookup
ExcelExcel
Validated
INDEX Function Excel & Sheets

Master INDEX to retrieve values from specific positions in arrays. Learn array manipulation with practical examples and solutions.

intermediate
lookup
ExcelExcel
Validated
INDEX MATCH Guide

Master the powerful INDEX MATCH combination. Learn flexible lookups that surpass VLOOKUP with examples and error solutions for Excel & Sheets.

advanced
lookup
ExcelExcel
Validated
VLOOKUP Function Guide

Master the VLOOKUP function with practical examples and error solutions. Learn how to search and retrieve data efficiently in Excel and Google Sheets.

intermediate
lookup
ExcelExcel
Validated