

If you run sales, marketing, or an agency, your spreadsheets are probably full of messy strings: “Name – Company – Title”, UTM-packed URLs, CRM exports with five values jammed into one cell. Excel’s TEXTAFTER function is built for this chaos. Give it a delimiter, optionally tell it which occurrence to use, and it reliably returns the text that comes after. Need the domain after “@”, the campaign name after the third “/”, or everything after the last dash in a product code? TEXTAFTER turns a tangle of text into clean columns you can actually analyze.
But once you’re cleaning thousands of rows across Google Sheets and Excel every week, the bottleneck is no longer the formula – it’s you. That’s where an AI agent shines. Instead of opening files, tweaking ranges, fixing #N/A errors, and copying formulas sheet by sheet, you let an AI computer agent drive the apps: it opens workbooks, applies or mimics TEXTAFTER, validates results, and saves outputs while you focus on strategy, not cell surgery.
For modern Excel (Microsoft 365 / Excel 2021+), TEXTAFTER is the native way to grab everything after a delimiter.
Basic pattern:=TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])
Example: Get the domain from an email
alex@simular.ai.=TEXTAFTER(A2, "@")simular.ai.Example: Get everything after the last dash
SKU-2025-Q1-US.US, use a negative instance:=TEXTAFTER(A2, "-", -1).Q1-US (after the second dash from the left):=TEXTAFTER(A2, "-", 2).You can tune behavior:
match_mode: 0 for case‑sensitive, 1 for case‑insensitive.if_not_found: e.g. "" to avoid #N/A.Full reference: Microsoft’s official doc at https://support.microsoft.com/en-us/office/textafter-function-c8db2546-5b51-416a-9690-c7e6722e90b4
If you’re on older Excel, you can emulate TEXTAFTER.
Get text after the first comma:
John Doe, CEO, Simular.=MID(A2, FIND(",", A2) + 1, LEN(A2))Get text after the last space:
Maria Lopez Growth Lead.=FIND("♦",SUBSTITUTE(A2," ","♦",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))=MID(A2, that_formula + 1, LEN(A2))This is clunky but works where TEXTAFTER is missing.
Google Sheets doesn’t yet have TEXTAFTER, but you can replicate it.
Using SPLIT for simple cases:
name@company.com.=INDEX(SPLIT(A2, "@"), 1, 2){"name","company.com"} and INDEX picks the second value.Using REGEXEXTRACT for patterns:
AB-123-XYZ.=REGEXEXTRACT(A2, "-(.*)")123-XYZ.Docs:
Once you know the formulas, the next step is to stop doing the same clicks every Monday.
Scenario: Weekly CSV export from your CRM that needs domain names extracted from email addresses.
Raw_Leads.Clean_Leads, set up formulas:=Raw_Leads!A2.=INDEX(SPLIT(Raw_Leads!A2, "@"), 1, 2).Raw_Leads.Result: Drop in a new file, click a macro (or wait for the trigger), and all the “TEXTAFTER-like” parsing runs for you.
Power Query can industrialize text extraction without code.
Example: Clean a messy product code column
Product_Code: BRAND-SKU-2025-Q1).-, select Right-most delimiter to mimic "after last dash" behavior when needed.Quarter).Next time the file updates, just hit Refresh—Power Query reruns the whole pipeline.
Docs:
For marketers and agencies, your "text after" needs rarely live in a single sheet.
Example: Parse UTM parameters from links in a form tool and log them in Sheets
=REGEXEXTRACT(A2, "utm_campaign=([^&]+)")Now your analytics dashboard always has ready-to-use fields with no manual parsing.
At some point, even no-code tools hit limits: odd one-off files, legacy Excel models, or teams that refuse to touch formulas. This is where an AI computer agent like Simular becomes your ops teammate.
Simular Pro is designed to behave like a power user:
=TEXTAFTER(A2, "@") (or a legacy MID/FIND combo), drags it down, and saves.Pros:
Cons:
Learn more about Simular Pro’s desktop automation at https://www.simular.ai/simular-pro
For sales or marketing teams that live in online tools:
Now, the entire “extract text after X” routine—from web app export to cleaned spreadsheet—is hands-off. You trigger it via a webhook or a simple command.
Pros:
Cons:
By starting with manual formulas, layering in no-code tools, and finally letting an AI agent run the whole play, you move from “I know how TEXTAFTER works” to “My spreadsheet text cleanup runs itself while I close deals.”
In modern Excel (Microsoft 365 / Excel 2021+), the simplest way to extract everything after a specific character or text is with the TEXTAFTER function.
Assume cell A2 contains john.doe@agency.com and you want everything after the @ symbol:
=TEXTAFTER(A2, "@")agency.com.If your text has multiple occurrences of a delimiter, use the instance_num argument. For example, with product-line-region in A2 and you want everything after the second dash:=TEXTAFTER(A2, "-", 2)
If there’s a chance the delimiter is missing, add an if_not_found value to avoid #N/A errors:=TEXTAFTER(A2, "@", 1, , , "")
Official docs: https://support.microsoft.com/en-us/office/textafter-function-c8db2546-5b51-416a-9690-c7e6722e90b4
If your Excel version doesn’t support TEXTAFTER, you can recreate most of its behavior with a combination of FIND (or SEARCH), LEN, and MID.
Example: Get text after the first comma
John Doe, CEO, Simular.=MID(A2, FIND(",", A2) + 1, LEN(A2))Example: Get text after the last space
Maria Lopez Growth Lead.=FIND("♦", SUBSTITUTE(A2, " ", "♦", LEN(A2)-LEN(SUBSTITUTE(A2, " ", ""))))=MID(A2, that_formula + 1, LEN(A2))While more complex than TEXTAFTER, these formulas achieve similar results. For recurring tasks, consider moving critical parsing work to a newer Excel version or having an AI agent operate a modern Excel install where TEXTAFTER is available.
Google Sheets doesn’t currently offer a native TEXTAFTER function, but you can achieve the same outcome using SPLIT and REGEXEXTRACT.
Using SPLIT for simple delimiters
If A2 contains name@company.com and you want everything after @:
=INDEX(SPLIT(A2, "@"), 1, 2)@.company.com.Using REGEXEXTRACT for patterns
For more complex patterns like AB-123-XYZ in A2 where you want everything after the first dash:
=REGEXEXTRACT(A2, "-(.*)")123-XYZ.Docs:
Once you’ve built and tested these formulas, you can have an AI agent consistently apply them for every new Sheet your business generates.
TEXTAFTER returns `#N/A` if it can’t find the delimiter, or if the requested instance number doesn’t exist. In business data (exports from CRMs, ad platforms, or form tools), that’s common, so you want to guard against it.**Basic protection with if_not_found**If A2 contains an email but sometimes the `@` is missing, use:`=TEXTAFTER(A2, "@", 1, , , "MISSING")`Here, "MISSING" replaces `#N/A` with a clear label.**Wrap with IF and ISNA**For more control:`=IF(ISNA(TEXTAFTER(A2, "@")), "", TEXTAFTER(A2, "@"))`This returns an empty string when TEXTAFTER would error.**Use match_end when helpful**Setting `match_end` to `1` lets TEXTAFTER treat the end of text as a delimiter in some edge cases, but use it carefully; when combined with negative instance numbers, it can change what counts as “missing”.For large datasets, consider documenting these rules so an AI agent (like Simular) can follow the same logic when it encounters unexpected rows.
An AI agent like Simular is ideal when your team repeatedly applies the same TEXTAFTER-style logic across many Google Sheets and Excel files or across apps.**Typical workflow:**1. You record or describe a sequence once: open Excel, load a report, insert a TEXTAFTER formula in a new column, fill it down, filter, and save a cleaned file.2. Simular Pro learns this sequence and can replay it on any similar file: whether that’s a lead export from your CRM, a product feed, or a weekly campaign report.3. For Google Sheets, the agent opens the browser, locates the sheet, inserts SPLIT or REGEXEXTRACT formulas, and validates results.**Business impact:**- Sales ops: Auto-extract domains, job titles, regions from raw lead lists.- Marketing: Parse UTMs and creative IDs from URLs without touching formulas.- Agencies: Standardize dozens of client exports without hiring a dedicated spreadsheet specialist.Because Simular logs every action, you can audit, refine, and safely scale the process instead of re-teaching each new team member how to use TEXTAFTER.