Replace occurrences of specific text within a string.
Syntax
SUBSTITUTE(text, old_text, new_text, [instance_num])Arguments
textrequired
The original text.
old_textrequired
The text to replace.
new_textrequired
What to replace it with.
instance_numoptional
Which occurrence to replace; omit for all.
SUBSTITUTE swaps one piece of text for another by value — ideal for cleaning data (removing symbols, fixing separators). Use REPLACE when you want to replace by position instead.
=SUBSTITUTE("1,250,000", ",", "")→1250000Strips commas so the value can be used as a number.
Pick the text to swap
Specify the exact old text (case-sensitive).
Limit by instance if needed
Add instance_num to replace only the Nth occurrence.
SUBSTITUTE replaces by matching text; REPLACE replaces a fixed character range by position.