Replace occurrences of specific text within a string.
This function works the same in Google Sheets as it does in Excel — same syntax and arguments.
SUBSTITUTE(text, old_text, new_text, [instance_num])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", ",", "")Result: 1250000
Strips commas so the value can be used as a number.
SUBSTITUTE replaces by matching text; REPLACE replaces a fixed character range by position.