How to Get the Text After a Character in Excel

TEXTAFTER returns everything after a delimiter. Pull campaign names from tags and paths and sections from web analytics URLs.

You will learn to

  • Extract everything after a delimiter with TEXTAFTER
  • Use a multi-character delimiter
  • Nest TEXTAFTER and TEXTBEFORE to grab a middle piece

How it works

=TEXTAFTER(text, delimiter) returns everything that follows the delimiter: =TEXTAFTER("utm_source=newsletter","=") returns "newsletter". The delimiter can be several characters long, so =TEXTAFTER(A2,".com/") returns the path of a URL. Like TEXTBEFORE, it is available in Excel for Microsoft 365 and Excel 2024.

To grab a piece from the middle, nest the two functions: TEXTAFTER cuts off the front and TEXTBEFORE cuts off the back. =TEXTBEFORE(TEXTAFTER(A2,".com/"),"/") returns the first folder of a URL path, e.g. "products".

=TEXTAFTER(B2,"=")