ExcelExcel 2024+
TEXTAFTER function in Excel
Returns text that occurs after given character or string
=TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])TEXTAFTER syntax and parameters
Six arguments, two required.
- textstringRequired
- delimiterstringRequired
- instance_numanyOptional
- match_modeanyOptional
- match_endanyOptional
- if_not_foundanyOptional
TEXTAFTER examples
Formulas you'll actually reuse.
The domain of an email address:
=TEXTAFTER(B2, "@")Result
"example.com"Everything after the SECOND hyphen of a code like NYC-10422-A:
=TEXTAFTER(A2, "-", 2)Result
"A"
TEXTAFTER in Google Sheets
No direct equivalent — here's the way around.
Try TEXTAFTER in the playground
Edit the example — nothing to install.
Preloaded with the TEXTAFTER formula from Example 1 — change anything and watch it respond.
Loading the editor…
TEXTAFTER errors
What they mean — and the fixes.
#N/AThe delimiter wasn't found (or there aren't that many instances) — pass if_not_found to return a fallback instead.
Related functions
More ways Excel gets this done.
- ARRAYTOTEXTReturns an array of text values from any specified rangeTextNo Google Sheets equivalent
- CHARReturns the character specified by the code numberTextGoogle Sheets
- CLEANRemoves all nonprintable characters from textTextGoogle Sheets
- CODEReturns a numeric code for the first character in a text stringTextGoogle Sheets
- CONCATCombines the text from multiple ranges and/or strings, but it doesn't provide the delimiter or IgnoreEmpty arguments.TextGoogle Sheets
- CONCATENATEJoins several text items into one text itemTextGoogle Sheets