

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.
### 1. Manual ways to extract text after a delimiter#### 1.1 Using TEXTAFTER in ExcelFor 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**1. Suppose A2 contains `alex@simular.ai`.2. In B2 enter: `=TEXTAFTER(A2, "@")`3. Result: `simular.ai`.**Example: Get everything after the last dash**1. A2: `SKU-2025-Q1-US`.2. To get just `US`, use a negative instance: `=TEXTAFTER(A2, "-", -1)`.3. To get `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#### 1.2 Using classic functions in Excel (when TEXTAFTER isn’t available)If you’re on older Excel, you can emulate TEXTAFTER.**Get text after the first comma:**1. A2: `John Doe, CEO, Simular`.2. In B2: `=MID(A2, FIND(",", A2) + 1, LEN(A2))`3. This finds the comma, jumps one character, and returns the rest.**Get text after the last space:**1. A2: `Maria Lopez Growth Lead`.2. Find last space: `=FIND("♦",SUBSTITUTE(A2," ","♦",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))`3. Then wrap in MID: `=MID(A2, that_formula + 1, LEN(A2))`This is clunky but works where TEXTAFTER is missing.#### 1.3 Approximating TEXTAFTER in Google SheetsGoogle Sheets doesn’t yet have TEXTAFTER, but you can replicate it.**Using SPLIT for simple cases:**1. A2: `name@company.com`.2. In B2: `=INDEX(SPLIT(A2, "@"), 1, 2)`3. SPLIT creates `{"name","company.com"}` and INDEX picks the second value.**Using REGEXEXTRACT for patterns:**1. To get everything after the first dash: A2: `AB-123-XYZ`.2. In B2: `=REGEXEXTRACT(A2, "-(.*)")`3. This returns `123-XYZ`.Docs:- SPLIT: https://support.google.com/docs/answer/3094136- REGEXEXTRACT: https://support.google.com/docs/answer/3098242### 2. No-code automation methodsOnce you know the formulas, the next step is to stop doing the same clicks every Monday.#### 2.1 Google Sheets: Automate with macros + simple triggers**Scenario:** Weekly CSV export from your CRM that needs domain names extracted from email addresses.1. Import one sample CSV into a sheet `Raw_Leads`.2. In another sheet `Clean_Leads`, set up formulas: - A2: reference original email: `=Raw_Leads!A2`. - B2: domain: `=INDEX(SPLIT(Raw_Leads!A2, "@"), 1, 2)`.3. Fill these formulas down for a typical data range (e.g. 5,000 rows).4. Use **Extensions → Macros → Record macro** and: - Clear `Raw_Leads`. - Import the latest CSV. - Let Sheets recalc automatically.5. Save the macro and, optionally, connect it to a simple App Script trigger to run on a schedule.Result: Drop in a new file, click a macro (or wait for the trigger), and all the “TEXTAFTER-like” parsing runs for you.#### 2.2 Excel: Power Query for repeatable text splittingPower Query can industrialize text extraction without code.**Example: Clean a messy product code column**1. In Excel, select your data range and choose **Data → From Table/Range**.2. In Power Query, select the column (e.g. `Product_Code`: `BRAND-SKU-2025-Q1`).3. Use **Transform → Split Column → By Delimiter**.4. Choose delimiter `-`, select **Right-most delimiter** to mimic "after last dash" behavior when needed.5. Name the new column (e.g. `Quarter`).6. Click **Close & Load**.Next time the file updates, just hit **Refresh**—Power Query reruns the whole pipeline.Docs:- Power Query intro: https://support.microsoft.com/en-us/office/getting-started-with-query-editor-power-query-7104fbee-9e62-4cb9-a02e-5bfb1a6c536a#### 2.3 Zapier / Make: Chain TEXTAFTER-style logic across toolsFor 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**1. Trigger: Form submission in Typeform or HubSpot.2. Action: Send the row to Google Sheets via Zapier or Make.3. In a destination column, use: `=REGEXEXTRACT(A2, "utm_campaign=([^&]+)")`4. The automation writes raw URLs; Sheets formulas act like TEXTAFTER to keep campaign names and sources clean.Now your analytics dashboard always has ready-to-use fields with no manual parsing.### 3. Scaling with AI agents (Simular) at desktop levelAt 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.#### 3.1 Pattern: Let the agent operate Excel directlySimular Pro is designed to behave like a power user:1. You describe the workflow in natural language: - "Open this Excel file, find the column with emails, create a new column 'Domain', apply TEXTAFTER or an equivalent, fill down, save as a new file." 2. The agent opens Excel on your desktop, navigates the UI, types the formula `=TEXTAFTER(A2, "@")` (or a legacy MID/FIND combo), drags it down, and saves.3. Every click is logged, so you can inspect and adjust.**Pros:**- Works with any Excel version and messy UI-only workflows.- No need to teach your team formulas.- Ideal for agencies handling dozens of client templates.**Cons:**- Slightly more setup upfront (defining the workflow once).- Best on stable, repeatable processes.Learn more about Simular Pro’s desktop automation at https://www.simular.ai/simular-pro#### 3.2 Pattern: End-to-end web → Sheets → Excel automationFor sales or marketing teams that live in online tools:1. Simular agent logs into your CRM or ad platform.2. Exports CSVs, opens Google Sheets, pastes data, and inserts formulas using SPLIT or REGEXEXTRACT.3. Optionally downloads a summarized Excel report where TEXTAFTER is used to clean final fields.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:**- Fully cross-app: browser, Sheets, Excel.- Great for recurring weekly or daily reporting.**Cons:**- Requires clear definition of edge cases (missing delimiters, bad rows) so the agent knows how to handle errors.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.”
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Block quote
Ordered list
Unordered list
Bold text
Emphasis
Superscript
Subscript
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:1. Click the cell where you want the result, e.g. B2.2. Enter the formula: `=TEXTAFTER(A2, "@")`3. Press Enter. You’ll get `agency.com`.4. Drag the fill handle down to apply the same logic to the rest of the column.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**1. A2: `John Doe, CEO, Simular`.2. In B2, enter: `=MID(A2, FIND(",", A2) + 1, LEN(A2))`3. This finds the position of the first comma, adds 1 to move past it, and returns all remaining characters.**Example: Get text after the last space**1. A2: `Maria Lopez Growth Lead`.2. Replace the last space with a unique character and find its position: `=FIND("♦", SUBSTITUTE(A2, " ", "♦", LEN(A2)-LEN(SUBSTITUTE(A2, " ", ""))))`3. Wrap this in MID: `=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 `@`:1. In B2, enter: `=INDEX(SPLIT(A2, "@"), 1, 2)`2. SPLIT creates two pieces: before and after the `@`.3. INDEX pulls the second piece, which is `company.com`.**Using REGEXEXTRACT for patterns**For more complex patterns like `AB-123-XYZ` in A2 where you want everything after the first dash:1. In B2, use: `=REGEXEXTRACT(A2, "-(.*)")`2. This captures everything after the first dash, giving `123-XYZ`.Docs:- SPLIT: https://support.google.com/docs/answer/3094136- REGEXEXTRACT: https://support.google.com/docs/answer/3098242Once 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.