SUBSTITUTE Function

Replaces existing text with new text in a string.
Sample Usage
SUBSTITUTE("Hello Wlrld!", "l", "o", 3)
Syntax
SUBSTITUTE(
  • search_text
  • old_text
  • new_text
  • [
    replace_num
    ]
)
  • search_text
    The string containing the text that you want to replace.
  • old_text
    The text string to have replaced.
  • new_text
    The text string to replace old_text.
  • replace_num
    —[optional]
    The instance in search_text to replace old_text with new_text. If omitted, all instances are replaced.
Usage Notes
  • The text that you provide in SUBSTITUTE is case sensitive.
Was this article helpful?
YesNo