← All how-to recipes

How to find the row number of a value

✓ Verified in LibreOffice 25.8.7.3

Get which row a value sits in — for building references, jumping, or feeding INDEX.

The formula

AppFormulaNotes
Excel=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. Every formula here is confirmed by actually executing it.