Text
All versions
◉ 14 views
=SUBSTITUTE()
Substitutes new_text for old_text in a text string. Use SUBSTITUTE when you want to replace specific text in a text string; use REPLACE when you want to replace any text that occurs in a specific location in a text string.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=SUBSTITUTE(text, old_text, new_text, [instance_num])
Hover argument names in the table for details.
Output typeText
Popularity60 / 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 =SUBSTITUTE() 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 |
Any type | Required | The text or the reference to a cell containing text for which you want to substitute characters. |
old_text |
Any type | Required | The text you want to replace. |
new_text |
Any type | Required | The text you want to replace old_text with. |
instance_num |
Any type | Optional | Specifies which occurrence of old_text you want to replace with new_text. If you specify instance_num, only that instance of old_text is replaced. Otherwise, every occurrence of old_text in text is changed to new_text. |
▣ Examples
جایگزینی Cost به جای Sales (Cost Data)
=SUBSTITUTE(A2, "Sales", "Cost")
جایگزینی اولین رخداد «۱» با «۲» (Quarter 2, 2008)
=SUBSTITUTE(A3, "1", "2", 1)
جایگزینی سومین رخداد «۱» با «۲» (Quarter 1, 2012)
=SUBSTITUTE(A4, "1", "2", 3)
💬 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!