FormulaCraft

How to find the row number of a value in Excel and Google Sheets

Excel & Google Sheets
=MATCH("Bob",$A$2:$A$5,0)

Verified example

Computed by a real spreadsheet engine on the sample data below.

Name
Alice
Bob
Carlos
Diana

=MATCH("Bob",$A$2:$A$5,0)2

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Type =MATCH(lookupValue,range,0) where 0 means exact match. The result is the position within the range — 1 means the first cell, 2 the second, etc.
  2. 2To get the actual worksheet row number, add the row of the first cell minus one: =MATCH("Bob",$A$2:$A$100,0)+ROW($A$2)-1.
  3. 3Wrap in IFERROR to handle missing values gracefully: =IFERROR(MATCH("Bob",$A$2:$A$100,0)+ROW($A$2)-1,"Not found").

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

How do I find the row number of the last occurrence of a value?

Use =MATCH(2,1/(A2:A100=value),1) entered as an array formula (Ctrl+Shift+Enter in Excel). It finds the last position by exploiting the way MATCH searches from the end with match_type=1.

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: