intermediate 2 min read

MATCH Function in Google Sheets

MATCH returns the relative position of a value within a one-dimensional range. Syntax, examples, and common errors explained.

SB

Sheets Bootcamp

February 19, 2026 Β· Updated November 5, 2026

Reviewed by Ryan
Syntax
=MATCH(search_key, range, [search_type])

Quick Answer

=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 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

ParameterRequiredDescription
search_keyYesThe value to search for. Can be a number, text string, cell reference, or logical value.
rangeYesA one-dimensional range (single row or single column) to search within.
search_typeNoControls 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.

A
B
C
D
E
F
G
H
I
J
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Bib
Runner
Team
Finish
318
Ada Kim
Harbor
182
104
Tomas Ruiz
Ridge
195
227
Nell Okafor
Harbor
203
451
Sam Patel
Valley
214
139
Iris Chen
Ridge
226
380
Gus Moreno
Valley
238
262
Beth Lund
Harbor
251
415
Omar Haddad
Ridge
266
Find
Sam Patel
Position
B12

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 free

First 6 lessons free. No card needed. See plans

Keep going

Continue learning

Unit 2 is next. Get full access

Practice this in the app

Continue learning

Spot an error on this page? Tell us.

First 6 lessons free. No credit card required.

Start the course free
Continue learning

Cookie policy Β· Privacy policy