Text formula page
Extract Text After Character Formula
Use this when the useful value appears after a known separator.
Extract text after a character in Excel or Google Sheets.
If A2 is SKU-1001-East, the result starts with 1001-East in Excel and returns 1001 in the Sheets split example.
Copy formulas
=TEXTAFTER(A2, "-")=INDEX(SPLIT(A2, "-"), 1, 2)Excel TEXTAFTER returns everything after the first delimiter by default, while the shown Google Sheets formula returns only the second split segment.
Example data
| Raw Text | Example Result |
|---|---|
| Maya Chen | Maya |
| SKU-1001-East | SKU |
| https://www.example.com/pricing | example.com |
| Acme North | Acme North |
If A2 is SKU-1001-East, the result starts with 1001-East in Excel and returns 1001 in the Sheets split example.
How the formula works
- A2 is the source text.
- The delimiter decides where extraction starts.
- For multiple delimiters, specify which segment you need.
| Syntax piece | Role in the formula |
|---|---|
| A2 | The source text to inspect. |
| "-" | The delimiter separating the source segments. |
| instance_num or segment index | Excel counts delimiter occurrences; the Google Sheets version selects a numbered SPLIT segment. |
Verified examples
=TEXTAFTER(A2, "-")Excel: Enter SKU-1001-East in A2. Returns: 1001-East
=INDEX(SPLIT(A2, "-"), 1, 2)Google Sheets: Enter SKU-1001-East in A2. Returns: 1001
=TEXTAFTER(A2, "-", 2)Excel: Enter SKU-1001-East in A2. Returns: East
Common errors and fixes
| Issue | Likely cause | Fix |
|---|---|---|
| Excel and Google Sheets return different spans | TEXTAFTER returns the remainder after the first delimiter, while INDEX(SPLIT(...),1,2) returns only the second segment. | Choose the platform formula deliberately, or use the Excel instance_num and a Sheets segment index when the same segment is required. |
| The source has no delimiter | The requested delimiter does not occur in A2. | Verify the exact separator and add IFERROR when missing separators should produce a fallback. |
| The extracted value has the wrong segment or spaces | The delimiter occurrence or Sheets column index is wrong, or the source contains spaces around the separator. | Use instance_num 2 for the text after the second dash, or select Sheets segment 3, then TRIM if needed. |
When not to use this formula
- Do not use the basic Google Sheets formula when the desired output is the entire remainder after the delimiter; select the required segment or join the remaining segments explicitly.
Alternatives
| Alternative | When to use it |
|---|---|
| Split Text Formula | Use when every segment should be returned for inspection or further calculations. |
| Extract Text Before Character | Use when the needed value is the prefix before a delimiter. |
Related formulas
Official references
- TEXTAFTER function from Microsoft
FAQ
Why does Excel return 1001-East but Sheets returns 1001?
TEXTAFTER returns the full remainder after the first dash; INDEX with the second SPLIT segment returns only the next segment.
How do I extract East?
In Excel use TEXTAFTER(A2, "-", 2); in Google Sheets use INDEX(SPLIT(A2, "-"), 1, 3) to select the third segment.