This page isn't translated yet, so its text is in English. Function names and formulas are shown in your Excel language.
Excel function · Changing text
TEXTAFTER
Returns the text after a given separator.
What it does
TEXTAFTER returns everything after a separator. Together with TEXTBEFORE it splits a text into two parts without counting characters.
Syntax
=TEXTAFTER(text; delimiter; [instance_num]; [match_mode]; [match_end]; [if_not_found])Arguments in square brackets are optional, and … means you can add more of the same. In this Excel language, arguments are separated by ;
Arguments
- text
- The text to take the part from.
- delimiter
- The separator to look for, in quotes.
- instance_num
- Which occurrence of the separator to use. 1 (the default) is the first; -1 is the last.
- match_mode
- 0 (the default) is case-sensitive; 1 ignores case.
- match_end
- 1 treats the end of the text as a separator. Leave it out in most cases.
- if_not_found
- What to return when the separator isn't there, instead of
#N/A.
Example
Which domain does this email address belong to?
| A | B | |
|---|---|---|
| 1 | Domain | |
| 2 | ana.ruiz@example.com | example.com |
The formula in B2:
=TEXTAFTER(A2;"@")Result: example.com
Everything after the @ in ana.ruiz@example.com is example.com.
Common mistakes
- Taking the part after the first separator when you meant the last one, as with file extensions such as report.v2.pdf. Use -1 as the instance number.
- Not handling a missing separator, which gives
#N/A.
In other Excel languages
Excel translates function names, and in some languages the argument separator too. Type the name your Excel shows.
| Excel language | Function name | Separator |
|---|---|---|
| English | TEXTAFTER | , |
| Deutsch | TEXTNACH | ; |
| Français | Not confirmed yet | ; |
| Español (España) | TEXTODESPUES | ; |
| Español (México) | TEXTODESPUES | , |
| 日本語 | TEXTAFTER | , |
| 한국어 | TEXTAFTER | , |
| 繁體中文 | TEXTAFTER | , |
| ไทย | TEXTAFTER | , |
| ខ្មែរ | TEXTAFTER | , |
| Tiếng Việt | TEXTAFTER | ; |