Functions
SUBSTITUTE
Replace occurrences of a substring
Try it
When to use it
When should I use SUBSTITUTE instead of REPLACE?
Use SUBSTITUTE when you want to swap out matching text wherever it appears. Use REPLACE when you want to overwrite characters at a known position regardless of their content.
How do I replace only the second occurrence of a character?
Pass an instance number as the optional fourth argument, for example SUBSTITUTE(text, "-", "/", 2), to change just that occurrence.
Use cases
Remove thousands separators from a string
Replace only the first dash
Used in
Syntax
SUBSTITUTE(text, old, new, instance)