TEXTAFTER in Excel: get the text after a character
Microsoft 365 and Excel 2024.
Syntax
=TEXTAFTER(text, delimiter, [instance], [match_mode], [match_end], [if_not_found])
After the @
=TEXTAFTER(A2,"@")
asha@mail.in → mail.in
Last name
=TEXTAFTER(A2," ",-1)
-1 means after the last space, so “Srinivas R Vanamala” → Vanamala. More: separate first and last name.
File name from a path
=TEXTAFTER(A2,"\",-1)
Text between two characters
Combine both functions:
=TEXTBEFORE(TEXTAFTER(A2,"("),")")
“Pens (Blue)” → Blue.
Delimiter missing
=TEXTAFTER(A2,"@",,,,"")
Returns blank instead of #N/A.
Older Excel
=RIGHT(A2,LEN(A2)-FIND("@",A2))
See RIGHT.
The other half: TEXTBEFORE