To extract text after a character in Excel, you can use TEXTAFTER in current Excel versions or combine older text functions for wider compatibility.

The right formula depends on whether the character appears once, repeats, or might be missing.

Use TEXTAFTER to return text after a character

In Microsoft 365 and Excel 2024, TEXTAFTER returns the part of a text string that follows a delimiter.

For example, if cell A2 contains INV-2048, this formula returns 2048:

=TEXTAFTER(A2,"-")

The first argument is the source text, and the second is the character or text to find.

The delimiter itself is excluded from the result.

TEXTAFTER is available in Microsoft 365 and newer perpetual versions that include the function; it is not supported in many older Excel releases, such as Excel 2019 and 2016.

For a space-delimited name in A2, use =TEXTAFTER(A2," ").

If A2 contains Jordan Lee, the result is Lee.

Extract text after the last occurrence

By default, TEXTAFTER searches from the beginning and returns the text after the first matching delimiter.

To return text after the last occurrence, set the instance number to -1:

=TEXTAFTER(A2,"/",-1)

If A2 contains department/team/report.xlsx, the result is report.xlsx.

This is useful for extracting a filename from a path, the final segment of a category label, or a value after the last hyphen.

Handle missing characters and blank results

If the delimiter does not appear, TEXTAFTER returns a #N/A error by default.

You can provide a value for that case with the if_not_found argument:

=TEXTAFTER(A2,"-",1,0,0,"Delimiter not found")

The third argument, instance_num, is 1 here, meaning the first occurrence.

The fourth argument controls whether the search is case-sensitive; 0 means case-insensitive.

The fifth controls whether Excel matches the end of the text as a delimiter.

The sixth supplies the result when no delimiter is found.

If you prefer a blank result, replace "Delimiter not found" with "".

For a shorter formula that handles the common missing-delimiter case, use:

=IFERROR(TEXTAFTER(A2,"-"),"")

This returns a blank if TEXTAFTER produces an error.

It also hides other errors in the formula, so use the explicit if_not_found argument when you want to handle only a missing delimiter.

Use a compatible formula in older Excel

In Excel versions without TEXTAFTER, combine MID, FIND, and LEN.

If A2 contains INV-2048, use:

=MID(A2,FIND("-",A2)+1,LEN(A2))

FIND locates the hyphen, adding 1 moves the starting position to the character after it, and MID returns the remaining characters.

The formula works in many older Excel versions, including Excel 2016 and Excel 2019.

FIND is case-sensitive when searching for letters.

To make a case-insensitive search, replace FIND with SEARCH:

=MID(A2,SEARCH("x",A2)+1,LEN(A2))

If A2 contains Box42, this returns 42.

FIND and SEARCH both return an error when the delimiter is missing.

To return a blank in that case, wrap the formula in IFERROR:

=IFERROR(MID(A2,FIND("-",A2)+1,LEN(A2)),"")

Extract after a delimiter when it appears more than once

TEXTAFTER makes repeated delimiters easier to handle.

If A2 contains North-West-Region, the first hyphen is found with:

=TEXTAFTER(A2,"-")

The result is West-Region.

To return Region, use:

=TEXTAFTER(A2,"-",-1)

You can also specify a positive occurrence number.

For example, =TEXTAFTER(A2,"-",2) returns the text after the second hyphen.

If the requested occurrence is not present, the result is #N/A unless you set if_not_found.

Extract after a character with a legacy formula

Older Excel does not offer a direct instance-number option in FIND, but you can locate the last occurrence by replacing the final delimiter with a marker.

For a hyphen-separated string in A2, this formula returns text after the last hyphen:

=MID(A2,FIND("~",SUBSTITUTE(A2,"-","~",LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))))+1,LEN(A2))

The formula counts the hyphens, replaces the final one with a tilde, finds that marker, and returns the remaining text.

Choose a marker that does not already appear in your data.

This formula is longer and harder to maintain, so use TEXTAFTER where available.

Common edge cases

  • Delimiter at the end: If A2 contains INV-, TEXTAFTER returns an empty string after the hyphen.
  • Delimiter at the start: If A2 contains -2048, the result is 2048.
  • Several-character delimiter: A delimiter can be text, not just one character.

    For Order: 2048, use =TEXTAFTER(A2,": ").
  • Extra spaces: If unwanted spaces remain around the extracted text, use =TRIM(TEXTAFTER(A2,"-")).

    TRIM removes leading and trailing spaces and reduces repeated internal spaces to single spaces.
  • Empty source cell: TEXTAFTER applied to an empty cell may return #N/A if the delimiter is absent.

    To preserve blanks, use =IF(A2="","",IFERROR(TEXTAFTER(A2,"-"),"")).
  • Delimiter characters with special meaning: TEXTAFTER treats its delimiter as literal text.

    In formulas, put text delimiters inside quotation marks, and double any quotation marks that need to be part of the delimiter.

Use the same approach in Google Sheets

If your Google Sheets account supports TEXTAFTER, use =TEXTAFTER(A2,"-") for a value in A2.

Otherwise, use the common MID and FIND pattern:

=MID(A2,FIND("-",A2)+1,LEN(A2))

In either application, check whether your spreadsheet uses commas or semicolons between function arguments.

Some regional settings require semicolons, for example =TEXTAFTER(A2;"-").