← All how-to recipes

How to get the text after the last delimiter (e.g. a file extension)

✓ Verified in LibreOffice 25.8.7.3

Return everything after the final separator, like the extension after the last dot.

The formula

AppFormulaNotes
Excel=TEXTAFTER(A2,".",-1)Excel 365; -1 means the last occurrence.
Google Sheets=REGEXEXTRACT(A2,"[^.]+$")Sheets: TEXTAFTER is not native; REGEXEXTRACT works.
LibreOffice Calc=TEXTAFTER(A2,".",-1)LibreOffice 25.8 supports TEXTAFTER.

How it works

TEXTAFTER(text, delimiter, -1) returns everything after the LAST occurrence of the delimiter. For 'report.final.xlsx' that is 'xlsx'. The negative instance number counts from the end.

Verified, not just documented

We ran =TEXTAFTER(A2,".",-1) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned xlsx — exactly the expected result. Every formula here is confirmed by actually executing it.