TEXTAFTER Function in Microsoft Excel: Syntax, Examples & Compatibility
Learn how to extract the portion of a product code that follows a delimiter in Microsoft Excel. Includes syntax, two verified-by-reasoning results, troubleshooting and portability notes.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: extract the portion of a product code that follows a delimiter in Microsoft Excel. The reproducible examples below use explicit values so the formula’s meaning is testable without a large workbook.
Evidence: The function name and syntax are documented in the linked vendor function reference. Expected outputs were independently reasoned or checked outside the application. These are not native Microsoft Excel test results. A guide being published here does not certify every software release or file-import scenario.
Availability and version history
- Introduced: Preview announced March 16, 2022: Windows Beta 2203 (15104.20004), Mac 16.60 (22030400). Web and Microsoft 365 Current Channel deployment reported September 29, 2022. Release history.
- Availability: Official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac.
- Checked: October 14, 2026; official TEXTAFTER reference. Documentation check, not a new native test; existing example-verification notes retain their scope.
Syntax and arguments
=TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])
The required inputs are text and delimiter. instance_num defaults to 1; a negative instance searches from the end. match_mode defaults to 0 (case-sensitive), while 1 ignores case. match_end defaults to 0; setting it to 1 treats the text boundary as a delimiter. if_not_found defaults to #N/A. Wildcards are not supported in this delimiter search.
Best use case: Extract the portion of a product code that follows a delimiter.
Set up the example sheet
Suppose stock numbers are stored as SKU-204 and compound labels have multiple hyphens.
Enter the formula in an unused cell. For a formula returning several values, leave an unobstructed area where those values can expand. These formulas use comma argument separators in a typical English-language locale; commas or semicolons inside quoted text are data, not argument separators. Adapt the separator if your regional settings require it.
Worked example 1: TEXTAFTER with known input
=TEXTAFTER("SKU-204","-")
Expected output: 204.
The substring following the first hyphen is returned.
Worked example 2: a second TEXTAFTER case
=TEXTAFTER("east-west-north","-",2)
Expected output: north.
The second hyphen starts the last segment.
Compare both results before replacing literal values or short sample ranges with your own workbook data. For a spilling formula, compare every output cell, not only the top-left result.
Last occurrence, case and missing-delimiter controls
=TEXTAFTER("east-west-north","-",-1)
=TEXTAFTER("ABxCD","X",1,1)
=TEXTAFTER("SKU","-",1,0,0,"Missing")
=TEXTAFTER("SKU","-",1,0,1)
Independent expected text results are north, CD, Missing and empty text. The second formula explicitly ignores case; with match_mode 0, the absent uppercase X produces the default #N/A. The third uses a missing-delimiter fallback. The fourth instead matches the end boundary, so there is no text after it.
The original result 204 is text extracted from the identifier, not a certified numeric conversion. Likewise, extracting from SKU-004 yields the text 004, preserving its leading zeros.
An empty delimiter matches immediately: positive instance 1 returns the entire source text, while instance -1 returns empty text. Instance zero or an instance greater than the text length has documented #VALUE! behavior. Too many actual delimiter occurrences requested has documented #N/A behavior; the fallback handles missing matches, not every invalid argument.
Practical advice and troubleshooting
When this formula helps: Pair TEXTAFTER with VALUE only if you genuinely want to convert a numeric-looking suffix into a number (and lose leading zeros).
Important edge case: If a delimiter does not exist, the default can be a #N/A error. Use the optional if_not_found argument when appropriate.
If the result differs, first verify the text-versus-number types of the input cells, the argument separators for your locale, and the range size. For dynamic arrays, inspect occupied cells in the output area. An error that looks like a missing function may reflect a software version rather than incorrect data.
Compatibility and version considerations
Google Sheets can use SPLIT or REGEXEXTRACT for related tasks, but syntax and edge cases differ.
TEXTAFTER is available in Microsoft 365 and Excel 2024.
Function availability and parameter behavior must be judged for the specific application and release; a function documented in one spreadsheet does not automatically work in another.
Related guides and official documentation
-
Microsoft Excel documentation for TEXTAFTER — function syntax and current vendor information.
Editorial verification: Vendor catalogue referenced as of 2026-10-12. The two example outputs are independently reasoned; no native application run, screenshot, or version-specific output is claimed. Review the editorial testing standards if you require stronger proof before importing a workbook.