Text
Excel 365
◉ 8 views
=TEXTAFTER()
Value returned if no match is found. By default, #N/A is returned.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for Mac
=TEXTAFTER(text,delimiter,[instance_num], [match_mode], [match_end], [if_not_found])
Hover argument names in the table for details.
Output typeText
Popularity55 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon
▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =TEXTAFTER() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
🧠 🧠 Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
text |
Text | Required | The text you are searching within. Wildcard characters not allowed. |
delimiter |
Text | Required | The text that marks the point after which you want to extract. |
instance_num |
Number | Optional | The instance of the delimiter after which you want to extract the text. By default, instance_num = 1. A negative number starts searching text from the end. |
match_mode |
Number | Optional | Determines whether the text search is case-sensitive. The default is case-sensitive. Enter one of the following: Values: 0 = Case sensitive.; 1 = Case insensitive.. |
match_end |
Text | Optional | Treats the end of text as a delimiter. By default, the text is an exact match. Enter one of the following: Values: 0 = Don't match the delimiter against the end of the text.; 1 = Match the delimiter against the end of the text.. |
if_not_found |
Number | Optional | Value returned if no match is found. By default, #N/A is returned. |
▣ Examples
متن پس از Red
=TEXTAFTER(A2,"Red")
#N/A چون basket یافت نشد
=TEXTAFTER(A2,"basket")
متن پس از دومین red
=TEXTAFTER(A3,"red",2)
متن پس از دومین red از انتها
=TEXTAFTER(A3,"red",-2)
#N/A به دلیل حساسیت به حروف
=TEXTAFTER(A3,"Red",,FALSE)
#N/A چون رخداد سوم وجود ندارد
=TEXTAFTER(A2,"red",3)
نام خانوادگی پس از فاصله با تطبیق انتهای متن
=TEXTAFTER(A2," ",,,1)
#N/A بدون تطبیق انتهای متن
=TEXTAFTER(A3," ",,,0)
متن خالی وقتی نام تککلمهای است و انتهای متن تطبیق داده شود
=TEXTAFTER(A3," ",,,1)
برگرداندن خود متن اگر نتیجه خالی باشد
=IF(TEXTAFTER(A3," ",,,1)="",A3)
نام خانوادگی پس از فاصله با تطبیق انتها
=TEXTAFTER(A4," ",,,1)
✦ Tips
- When searching with an empty delimiter value, TEXTAFTER matches immediately. It returns the entire text when searching from the front (if instance_num is positive) and empty text when searching from the end (if instance_num is negative).
⚠ Common Errors
#N/A
By default, #N/A is returned. Excel returns a #N/A error if delimiter isn't contained in text. Excel returns a #N/A error if instance_num is greater than the number of occurrences of delimiter.
Fix: Check the delimiter or specify a fallback value in the last argument
#VALUE!
Excel returns a #VALUE! error if instance_num = 0 or if instance_num is greater than the length of text.
Fix: برای instance_num مقدار غیرصفر و در بازه مجاز وارد کنید.
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!