Excel TEXTAFTER Function: Extract Text After Delimiters (2025 Guide)

Published: January 21, 2025 - 3 min read

Vijay Srinivas

The TEXTAFTER function in Excel helps you extract specific portions of text that appear after a delimiter. Whether you’re cleaning up messy data or need to split email addresses into username and domain parts, TEXTAFTER makes text extraction simple and precise.

How to Extract Text After a Specific Character in Excel

The TEXTAFTER function follows a straightforward syntax:

Copy

=TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])

Let’s break this down with a practical example.

Command: Extract the domain from an email address

Email Address

Formula

Result

john.doe@company.com

=TEXTAFTER(A2,”@”)

company.com

  1. Select the cell where you want the result
  2. Type the formula =TEXTAFTER()
  3. Enter your text or cell reference as the first argument
  4. Add the delimiter (“@” in this case) as the second argument
  5. Press Enter to see the result

Working with Single Delimiters

Single delimiters are the most common use case for TEXTAFTER. Here’s how to handle different scenarios:

Command: Extract text after various common delimiters

Original Text

Delimiter

Formula

Result

First Last

” “

=TEXTAFTER(A1,” “)

Last

123-456-789

“-“

=TEXTAFTER(A2,”-“)

456-789

Product_Code_v2

“_”

=TEXTAFTER(A3,”_”)

Code_v2

Pro Tip: TEXTAFTER is case-sensitive by default. To make it case-insensitive, set the [match_mode] parameter to 2.

Extracting Text After Multiple Occurrences

Sometimes you need to extract text after a specific instance of a delimiter.

Command: Extract text after the second occurrence of a delimiter

File Name

Formula

Result

2024_Q1_Report.xlsx

=TEXTAFTER(A2,”_”,2)

Report.xlsx

When working with multiple instances:

  1. Add the instance number as the third argument
  2. Use positive numbers to count from the start
  3. Use negative numbers to count from the end

Combining TEXTAFTER with Other Excel Functions

TEXTAFTER becomes even more powerful when combined with other functions.

Command: Create a complex text extraction

Raw Data

Formula

Result

file-2024-01-15.pdf

=TEXTAFTER(TEXTBEFORE(A2,”.pdf”),”-“,3)

Coefficient Excel Google Sheets Connectors
Try the Free Spreadsheet Extension Over 500,000 Pros Are Raving About

Stop exporting data manually. Sync data from your business systems into Google Sheets or Excel with Coefficient and set it on a refresh schedule.

Get Started

15

This formula:

  1. Uses TEXTBEFORE to remove the file extension
  2. Uses TEXTAFTER to get the day from the date
  3. Combines both functions for precise extraction

Real-World Applications

Here are practical scenarios where TEXTAFTER proves invaluable:

Command: Parse customer data

Customer Info

Formula

Result

ID: 12345 – Name: John

=TEXTAFTER(A2,”Name: “)

John

Command: Clean website URLs

URL

Formula

Result

https://website.com/blog

=TEXTAFTER(A2,”//”,,1)

website.com/blog

Essential TEXTAFTER Parameters

Understanding optional parameters helps handle complex scenarios:

  • [match_mode]: Controls case sensitivity and matching behavior
  • [match_end]: Determines if the delimiter should be included
  • [if_not_found]: Specifies what to return if no match is found

Common Text Extraction Scenarios

Let’s look at frequent use cases:

Command: Split file paths

File Path

Formula

Result

C:\Documents\Reports\2024

=TEXTAFTER(A2,””,2)

Reports\2024

Next Steps

TEXTAFTER simplifies text extraction in Excel, making data cleanup and analysis more manageable. Practice these examples to build confidence with the function.

Ready to take your Excel data management to the next level? Try Coefficient to automatically sync and refresh your spreadsheet data from 50+ business systems. Get started with Coefficient today and transform how you work with data in Excel.

Sync Live Data into Your Spreadsheet

Connect Google Sheets or Excel to your business systems, import your data, and set it on a refresh schedule.

Try the Spreadsheet Automation Tool Over 500,000 Professionals are Raving About

Tired of spending endless hours manually pushing and pulling data into Google Sheets? Say goodbye to repetitive tasks and hello to efficiency with Coefficient, the leading spreadsheet automation tool trusted by over 350,000 professionals worldwide.

Sync data from your CRM, database, ads platforms, and more into Google Sheets in just a few clicks. Set it on a refresh schedule. And, use AI to write formulas and SQL, or build charts and pivots.

Vijay Srinivas GTM @ Coefficient
Vijay Srinivas is an engineer turned marketer who loves to dabble in data and has 6 years of experience in GTM for Startups and SaaS orgs. Building his skills currently to be a PLG & spreadsheet expert.
500,000+ happy users
Wait, there's more!
Connect any system to Google Sheets in just seconds.
Get Started Free

Trusted By Over 50,000 Companies