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.
| A | B | C | |
|---|---|---|---|
| 1 | Customer | Reference | |
| 2 | Lopez, Maria | maria@northwind.com | Order #48213 |
| 3 | Patel, Dev | dev@harborfoods.org | Order #48219 |
| 4 | Ng, Kim | kim@lakeside.io | Refund |
Result: northwind.com
Returns the email domain: northwind.com.
Result: Dev
The first name comes after the comma and space: Dev.
Result: 48213
Pulls the order number out of the reference.
Result: No order
There is no # in "Refund", so IFERROR shows a label instead of #N/A.
How to use TEXTAFTER
- Click the cell for the result.
- Type =TEXTAFTER( and click the text cell.
- Type a comma and the delimiter in quotes.
- 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
- How to separate first and last name in Excel
- How to extract text before a character in Excel
- How to extract numbers from a string in Excel
Related functions
TEXTBEFOREText before a delimiterMIDCharacters from the middleFINDPosition of text (case-sensitive)TRIMRemoves extra spaces
Updated