Match Function in Google Sheets: A Practical Guide
Explore the MATCH function in Google Sheets: exact and approximate lookups, how it returns a position, and how to combine it with INDEX or FILTER for dynamic data retrieval.

The MATCH function locates a specified value within a vertical or horizontal range and returns its position as a numeric index. It is a foundational tool for dynamic lookups and parameterizing formulas in modern spreadsheets. In practice, you use MATCH to supply an index to other functions such as INDEX, FILTER, or OFFSET, enabling you to retrieve data without hard-coding row numbers. According to How To Sheets, mastering MATCH is essential for building scalable, robust Google Sheets workflows. You can use it with exact matches (0) or with approximate matches (1 or -1) depending on how your data is sorted. This capability is particularly powerful when building dashboards or data validation rules where the exact location of a value determines downstream results.
What is the MATCH function in Google Sheets?
The MATCH function locates a specified value within a vertical or horizontal range and returns its position as a numeric index. It is a foundational tool for dynamic lookups and parameterizing formulas in modern spreadsheets. In practice, you use MATCH to supply an index to other functions such as INDEX, FILTER, or OFFSET, enabling you to retrieve data without hard-coding row numbers. According to How To Sheets, mastering MATCH is essential for building scalable, robust Google Sheets workflows. You can use it with exact matches (0) or with approximate matches (1 or -1) depending on how your data is sorted. This capability is particularly powerful when building dashboards or data validation rules where the exact location of a value determines downstream results.
Example 1: exact match
=MATCH("Apples", A2:A10, 0)Example 2: approximate match
=MATCH(25, B1:B100, 1)Notes:
- The third argument controls the matching mode; exact (0) is the most common for textual data.
- Ensure your data ranges are consistent in type to avoid surprising results.
description
Steps
Estimated time: 15-25 minutes
- 1
Prepare your dataset
Organize a clean lookup column (e.g., A2:A100) and a data column to retrieve (e.g., B2:B100). Ensure data types are consistent and headers are clear.
Tip: Add a data validation rule to keep lookup values consistent. - 2
Write a basic MATCH
Enter a straightforward MATCH to locate a value in the lookup column. Start with an exact match (0) for clarity.
Tip: Test with an item you know exists to verify positioning. - 3
Combine with INDEX for lookup
Use INDEX to return the corresponding value from the data column based on the MATCH result.
Tip: INDEX(B2:B100, MATCH("Product X", A2:A100, 0)) - 4
Handle not-found with IFNA
Wrap the formula in IFNA (or IFERROR) to gracefully handle missing values instead of #N/A.
Tip: IFNA(INDEX(...), "Not found") improves user experience. - 5
Explore multi-criteria lookups
For two criteria, use a combined boolean test inside MATCH or pair MATCH with FILTER.
Tip: Example: INDEX(C2:C100, MATCH(1, (A2:A100=E1)*(B2:B100=F1), 0)) - 6
Test and validate
Test with edge cases (missing values, duplicates) and verify results across different sheets.
Tip: Document the assumptions about data ordering and uniqueness.
Prerequisites
Required
- Required
- Basic spreadsheet knowledge (cell references, functions)Required
- A test Google Sheet containing sample dataRequired
Optional
- Optional: familiarity with INDEX or FILTER functionsOptional
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| CopyCopy formulas or data | Ctrl+C |
| PasteInsert copied content | Ctrl+V |
| Paste values onlyAvoid carrying over formulas | Ctrl+⇧+V |
| FindSearch within the sheet | Ctrl+F |
| Fill downCopy the cell above downward | Ctrl+D |
FAQ
What does MATCH return if there is no exact match?
MATCH returns #N/A when no match is found with an exact match (0). It may still return a position with approximate match if the data warrants it. Use IFNA to handle the not-found case gracefully.
If there isn't an exact match, MATCH shows an error unless you use IFNA to provide a friendly alternative.
Can MATCH handle text and numbers in the same lookup range?
MATCH can search both text and numbers, but ensure the lookup_value type matches the data type in the lookup_array. Mismatched types often lead to #N/A results.
Make sure your data types line up; text and numbers behave differently if mixed.
What is the difference between 1 and -1 in match_type?
1 finds the largest value less than or equal to the lookup_value (range must be sorted ascending). -1 finds the smallest value greater than or equal to the lookup_value (range must be sorted descending).
1 requires ascending data; -1 requires descending data.
How can I use MATCH with multiple criteria?
Use a composite condition inside MATCH, for example: INDEX(C2:C100, MATCH(1, (A2:A100=E1)*(B2:B100=F1), 0)). This works in Google Sheets and is handy for multi-criteria lookups.
You can combine two conditions to locate a row that matches both criteria.
Is there a performance impact using MATCH on large datasets?
MATCH is efficient for moderate ranges, but extremely large arrays can slow down worksheets. Consider narrowing ranges or using auxiliary lookup tables for complex dashboards.
For very large sheets, keep lookups scoped to smaller ranges when possible.
What’s a safe default for beginners?
Start with exact matching (0) and use INDEX/MATCH for simple lookups. Add IFNA to handle missing values gracefully as you grow more confident.
Begin with exact matches and build from there.
The Essentials
- Use MATCH to locate positions in a range
- Combine MATCH with INDEX for dynamic lookups
- Choose 0 for exact matches with text
- Ensure correct data order for approximate matches
- Handle not-found cases gracefully with IFNA/IFERROR