← All how-to recipes

How to find the position of a character in text

✓ Verified in LibreOffice 25.8.7.3

Return the numeric position where a character or substring first appears in a cell.

The formula

AppFormulaNotes
Excel=FIND("-",A2)FIND is case-sensitive; SEARCH is case-insensitive and allows wildcards.
Google Sheets=FIND("-",A2)Identical.
LibreOffice Calc=FIND("-",A2)Identical.

How it works

FIND(find_text, within_text) returns the 1-based position of the first match. In 'AB-123' the dash is the 3rd character, so it returns 3. FIND errors with #VALUE! if the character isn't present - wrap in IFERROR to return a fallback.

Verified, not just documented

We ran =FIND("-",A2) 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.