Pull the extension (the text after the last dot) from a filename.
Copy this formula
=TEXTAFTER(A2, ".", -1)Using instance -1 makes TEXTAFTER start from the last dot, so it works even when the filename contains several dots. In older Excel, the classic RIGHT/SUBSTITUTE/REPT trick handles it.
=TEXTAFTER("report.final.xlsx", ".", -1)→xlsxReturns the extension after the last dot.
Legacy
=TRIM(RIGHT(SUBSTITUTE(A2, ".", REPT(" ",100)), 100))Works without TEXTAFTER.
Use =TEXTBEFORE(A2, ".", -1) to keep everything before the last dot.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.