How to extract text after a character in Excel
Excel formula
=TEXTAFTER(A2,"@")Use =TEXTAFTER(A2,"@") in Excel 365. In any version, =MID(A2,FIND("@",A2)+1,LEN(A2)) returns everything after the character.
- Result on the example
- one result per row in
B2, filled down toB6 - Works in
- Excel 2024 and Microsoft 365
- Google Sheets
- Different formula, see below
See it work
The formula is already in B2, filled down to B6. Change any input and the result updates, or edit the formula to experiment.
How it works
TEXTAFTER returns what comes after the delimiter. In Google Sheets, REGEXEXTRACT(A2,"@(.+)") returns the part of the text matched by the brackets: one or more characters after the @.
=TEXTAFTER(A2,"@")Result"northwind.example"
A2"lena.park@northwind.example"The value in A2.
TEXTAFTER(A2,"@")"northwind.example"TEXTAFTER: Text after a delimiter.- text
A2"lena.park@northwind.example" - delimiter
"@"
- text
In Google Sheets
Google Sheets needs a different formula: =REGEXEXTRACT(A2,"@(.+)"). On the same data it gives the same result. Here it is running in Google Sheets mode.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =MID(A2,FIND("@",A2)+1,LEN(A2)) | northwind.example, contoso.example, fabrikam.example… | Works in every version: start one character after the @ and take up to the full length (MID stops at the end). |
| =RIGHT(A2,LEN(A2)-FIND("@",A2)) | northwind.example, contoso.example, fabrikam.example… | Counts how many characters follow the @ and takes that many from the right. |
Common mistakes
- If the character can appear more than once, TEXTAFTER uses the first by default. Use an instance number, like
TEXTAFTER(A2,".",-1)for after the last dot. - A missing delimiter returns #N/A. Give TEXTAFTER a fallback in its sixth argument.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Extract text after a character
B2, extract the domain: everything after the @ in the email address. Fill down to B6.Questions
How do I get the text before the @?
Use =TEXTBEFORE(A2,"@"), or =LEFT(A2,FIND("@",A2)-1) in older versions.
How do I extract text between two characters?
Nest them: =TEXTBEFORE(TEXTAFTER(A2,"@"),".") returns the part between the @ and the next dot.
Checked by running on 2026-10-29: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.