← All how-to recipes

How to find the position of a character in text

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

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

The formula

AppFormulaNotes
Excel (desktop)=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. 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

FIND — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons