How to find the row number of a value
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Get which row a value sits in — for building references, jumping, or feeding INDEX.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =MATCH(D2,A:A,0) | 0 = exact match. Against a partial range, add its offset: MATCH(...,A5:A100,0)+4. |
| Google Sheets | =MATCH(D2,A:A,0) | Identical. |
| LibreOffice Calc | =MATCH(D2,A:A,0) | Identical. |
How it works
MATCH returns the POSITION within the range you give it — searching whole-column A:A makes position and sheet row number the same thing, which is why that form answers the question directly. "cherry" is 3rd. Positions from partial ranges need the range's starting offset added back — the classic off-by-a-few bug. Not found gives #N/A (wrap in IFNA); wildcards work with match type 0 ("cher*").
Verified, not just documented
We ran =MATCH(D2,A1:A3,0) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 3 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 3 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.
Functions used
MATCH — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to do a case-sensitive lookup
- How to find the cell address of a value
- How to look up the closest match (tax brackets, tiers, grades)
- How to find the most common text value (mode for text)
- How to find the label that goes with the highest value