Skip to content
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.

  1. The domain of an email address:

    =TEXTAFTER(B2, "@")

    Result"example.com"

  2. 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/A

    The delimiter wasn't found (or there aren't that many instances) — pass if_not_found to return a fallback instead.