# TEXTAFTER formula generator

> Describe what you need and get a TEXTAFTER formula for Excel and Google Sheets, run on real data before you copy it. Plus 8 tested TEXTAFTER examples.

Source: https://spreadsheetpractice.com/tools/formula-generator/textafter · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

TEXTAFTER returns everything after a delimiter, such as the domain after the @ or the last part of a file path.

Describe the task at [TEXTAFTER formula generator](https://spreadsheetpractice.com/tools/formula-generator/textafter) and get a TEXTAFTER formula for Excel and Google Sheets, tested on real data.

## Tested TEXTAFTER examples

### Extract text after a character

`=TEXTAFTER(A2,"@")`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/extract-text-after-a-character)

### Extract characters from the middle of a text string

`=MID(A2,$E$1,$G$1)`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/extract-characters-from-middle)

### Extract text between two characters

`=TEXTBEFORE(TEXTAFTER(A2,$E$1),$G$1)`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/extract-text-between-two-characters)

### Sort names by last name with a formula

`=SORTBY(A2:A9,TEXTAFTER(A2:A9," ",-1))`

Excel. Result on the sample sheet: 8 rows (C2:C9). [See it and try it](https://spreadsheetpractice.com/formulas/sort-names-by-last-name)

### Remove a prefix from text

`=IF(LEFT(A2,LEN($E$1))=$E$1,MID(A2,LEN($E$1)+1,LEN(A2)),A2)`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/remove-a-prefix-from-text)

### Convert a score like 18/20 to a percentage

`=TEXTBEFORE(B2,"/")/TEXTAFTER(B2,"/")`

Excel. Result on the sample sheet: 5 rows (C2:C6). [See it and try it](https://spreadsheetpractice.com/formulas/convert-a-score-to-a-percentage)

### Convert text like 12 kg to a number

`=VALUE(TEXTBEFORE(A2," "))*IF(TEXTAFTER(A2," ")="g",0.001,1)`

Excel. Result on the sample sheet: 6 rows (B2:B7). [See it and try it](https://spreadsheetpractice.com/formulas/convert-text-with-units-to-numbers)

## Questions

### What does the TEXTAFTER formula generator do?

You describe the task in plain English, and it writes the formula, using TEXTAFTER where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

### What does TEXTAFTER do?

TEXTAFTER returns everything after a delimiter, such as the domain after the @ or the last part of a file path.

### Can I learn to write TEXTAFTER formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the TEXTAFTER function page has a practice exercise.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
