HomeGuides › How to Use SUBSTITUTE and REPLACE
Text Manipulation

How to Use SUBSTITUTE and REPLACE

Last updated: 2026-09-06

⚡ Quick Answer

SUBSTITUTE replaces existing text with new text in a string, while REPLACE targets specific character positions.

=SUBSTITUTE(A2, "old_val", "new_val")

📊 Visual Demo

Book1 - Excel
HOME · INSERT · FORMULAS · DATA
fx =SUBSTITUTE(A2, "old_val", "new_val")
ABCDE
11Item_A_Old"Old"=SUBSTITUTE(A2, "Old", "New")Item_A_New
22123-456-789Hyphen SwapSUBSTITUTECleaned Format
33DatabaseSanitizedVerifiedReady

🧠 Deep Dive

SUBSTITUTE replaces existing text with new text in a string, while REPLACE targets specific character positions.

Key Insights

  • Text functions are position-based (LEFT, RIGHT, MID).
  • FIND is case-sensitive, SEARCH is not.

Common Mistakes

  • Hard-coding character positions on variable data.

Pro Tips

  • Parse once into helper columns.
  • Test on longest/shortest strings.

FAQ

What does this formula do in plain English?

SUBSTITUTE replaces existing text with new text in a string, while REPLACE targets specific character positions.

Why is my formula not working?

Hard-coding character positions on variable data.

Does this work in Google Sheets?

Yes, this syntax is fully compatible with Google Sheets.

What is the most common mistake?

Hard-coding character positions on variable data.

Related Guides

How to Use TEXTJOIN in ExcelHow to Use LEFT, RIGHT, and MIDHow to Format Text Case in ExcelHow to Use the EXACT FunctionExcel Error Hub

Need Complete Playbooks?

Download our verified manuals covering ERP Cleanup and Modeling.

Explore Playbook Series (From ₹199)