Excel TEXTAFTER function
Returns the text that comes after a delimiter. In Spanish Excel it is called TEXTODESPUES.
Syntax
English Excel
=TEXTAFTER(text, delimiter, [instance_num])
Spanish Excel (Mexico)
=TEXTODESPUES(texto, delimitador, [núm_instancia])
Spanish Excel (Spain, Latin America)
=TEXTODESPUES(texto; delimitador; [núm_instancia])
| Argument | What it is |
|---|---|
| text | The full text. |
| delimiter | What marks the cut. |
| instance_numoptional | Which occurrence to use; -1 is the last. |
Example
TEXTBEFORE(text, delimiter) returns what comes before the delimiter and TEXTAFTER what comes after it. They replace long combinations of LEFT, FIND and MID. Excel 365 only.
=TEXTAFTER(A2,", ")
Common mistake
With -1 as the instance you get what follows the last occurrence, such as a file extension.
About Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Practice TEXTAFTER
Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons
TEXTBEFORE and TEXTAFTER
TEXTBEFORE(text, delimiter) returns what comes before the delimiter and TEXTAFTER what comes after it. They replace long combinations of LEFT, FIND and MID. Excel 365 only.
In B2, extract the last name: everything before the comma.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Full name | Last name | First name | |
| 2 | Hernández, Carmen | |||
| 3 | Ortiz, Jorge Luis | |||
| 4 | Ramírez, Lucía | |||
| 5 | De la Cruz, Andrés | |||
| 6 | Vega, Paola | |||
| 7 |
Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.
Frequently asked questions
- What is TEXTAFTER called in Spanish?
- In Spanish Excel it is TEXTODESPUES. The formula =TEXTAFTER(A2,", ") is written =TEXTODESPUES(A2;", ") (or with commas in Mexico).
- Why does TEXTAFTER use semicolons in some Excel versions?
- It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
- What is the most common TEXTAFTER mistake?
- With -1 as the instance you get what follows the last occurrence, such as a file extension.