Cellwise Try it free

Cleanup function

Excel TEXTAFTER function

TEXTAFTER returns everything in a text string after a character or word you choose. Use it to grab email domains, last names, order numbers after a prefix, or anything after a label.

=TEXTAFTER(text, delimiter)

Arguments

text
The text to split, usually a cell.
delimiter
The character or text to start after, in quotes.

TEXTAFTER examples

Every result below was calculated from this sample sheet by the same spreadsheet engine the Cellwise app uses.

ABC
1CustomerEmailReference
2Lopez, Mariamaria@northwind.comOrder #48213
3Patel, Devdev@harborfoods.orgOrder #48219
4Ng, Kimkim@lakeside.ioRefund
  1. =TEXTAFTER(B2,"@")

    Result: northwind.com

    Returns the email domain: northwind.com.

  2. =TEXTAFTER(A3,", ")

    Result: Dev

    The first name comes after the comma and space: Dev.

  3. =TEXTAFTER(C2,"#")

    Result: 48213

    Pulls the order number out of the reference.

  4. =IFERROR(TEXTAFTER(C4,"#"),"No order")

    Result: No order

    There is no # in "Refund", so IFERROR shows a label instead of #N/A.

How to use TEXTAFTER

  1. Click the cell for the result.
  2. Type =TEXTAFTER( and click the text cell.
  3. Type a comma and the delimiter in quotes.
  4. Press Enter, then fill down.

Common TEXTAFTER mistakes

Including too little in the delimiter

TEXTAFTER(A2,",") keeps the space after the comma. Use ", " or wrap the result in TRIM.

Getting #N/A

The delimiter is missing from that cell. Use IFERROR or the if_not_found argument.

Using it in older Excel

TEXTAFTER needs Microsoft 365, Excel 2024 or Excel for the web. Older versions need MID with FIND.

TEXTAFTER FAQ

How do I extract text after a character in Excel?

Use =TEXTAFTER(A2,"@"). It returns everything after the first @ in the cell.

How do I get the domain from an email address in Excel?

Use =TEXTAFTER(A2,"@"). In older Excel, use =MID(A2,FIND("@",A2)+1,100).

How do I get text after the last space in Excel?

Use -1 as the instance number: =TEXTAFTER(A2," ",-1). Negative numbers count from the end.

Practice TEXTAFTER in these lessons

Guides that use TEXTAFTER

Related functions

Updated