Text All versions ◉ 7 views

=REPLACE()

Replaces part of a text based on position and character count with other text

=REPLACE(old_text, start_num, num_chars, new_text)
Hover argument names in the table for details.
Output typeText
Popularity50 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =REPLACE() 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)
📥 Download REPLACE.xlsx — Coming soon ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

🧠 🧠 Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
old_text Text Required Source text
start_num Number Required Character number where replacement starts
num_chars Number Required Number of characters to remove
new_text Text Required New text

▣ Examples

Example 1 =REPLACE(A2, 5, 3, "***")
Example 2 =REPLACE(A2, 5, 0, "-")

✦ Tips

  • If the third argument is zero, nothing is removed and the new text is just inserted at that position.
  • If the fourth argument is "", that part of the text is removed.
  • The result is always text, even if the input is a number.
  • Spaces also count as characters.

⚠ Common Errors

#VALUE! The second argument is less than 1, or the third argument is negative, or one of the two is not a number
Fix: Check the second and third arguments

💬 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!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.