=MATCH(search_key, range, [search_type]) returns the position of a value in a single row or column, not the value itself. Use 0 as the last argument for an exact match. For example, if Gadget is in A5, =MATCH("Gadget", A2:A20, 0) returns 4, because A5 is the fourth cell in A2:A20. The default search type is 1, which expects data sorted ascending.
MATCH Function in Google Sheets
MATCH returns the relative position of a value within a one-dimensional range. Syntax, examples, and common errors explained.
Sheets Bootcamp
February 19, 2026 Β· Updated November 5, 2026
Table of Contents
=MATCH(search_key, range, [search_type]) Quick Answer
MATCH in Google Sheets returns the relative position of a value within a single row or column. It tells you where a value sits in a range, not the value itself. MATCH is most often paired with INDEX to build flexible lookups, but it is also useful on its own when you need a position number.
Parameters
| Parameter | Required | Description |
|---|---|---|
search_key | Yes | The value to search for. Can be a number, text string, cell reference, or logical value. |
range | Yes | A one-dimensional range (single row or single column) to search within. |
search_type | No | Controls the match behavior. 0 = exact match. 1 = finds the largest value less than or equal to search_key (range must be sorted ascending). -1 = finds the smallest value greater than or equal to search_key (range must be sorted descending). Default is 1. |
Try it yourself
Question 1 of 3
3 quick questions. No account needed.
In B12, use MATCH to find the position of the runner in B11 within B2:B9. Use 0 for an exact match.
Examples
Find the position of a value
Find the row position of βGadgetβ in a product list:
=MATCH("Gadget", A2:A20, 0)
If βGadgetβ is in cell A5, this returns 4 (the 4th cell in the range A2:A20). The 0 argument requires an exact match.
Use with INDEX for a two-way lookup
Return the Q2 sales figure for βNorthβ region, where regions are in column A and quarter headers are in row 1:
=INDEX(B2:E10, MATCH("North", A2:A10, 0), MATCH("Q2", B1:E1, 0))
The first MATCH finds the row position of βNorth.β The second MATCH finds the column position of βQ2.β INDEX returns the value at that intersection.
Approximate match on sorted data
Find the position of the threshold closest to (but not exceeding) a score of 85, where A2:A6 contains sorted values 0, 60, 70, 80, 90:
=MATCH(85, A2:A6, 1)
This returns 4 (the position of 80), because 80 is the largest value that does not exceed 85.
Common Errors
#N/A: The search key was not found. With search_type set to 0, this means no exact match exists. Check for trailing spaces, case differences (MATCH is not case-sensitive), or data type mismatches between the search key and range values.
Tips
Always use 0 for the third argument when you need an exact match. The default value of 1 assumes your data is sorted in ascending order, and it returns approximate matches. This catches many people off guard.
MATCH returns a position relative to the range, not an absolute row number. If your range starts at row 5, and the match is in row 7, MATCH returns 3 (the third cell in the range).
You read it. Now type it.
Unit 1 of the course is free: 6 short lessons in a grid that checks every formula. They teach the Google Sheets skills you'll actually use.
Start the course freeFirst 6 lessons free. No card needed. See plans
Practice this in the app
Continue learningSpot an error on this page? Tell us.
Thanks. We'll fix it and update the page.