Skip to Content

SUBSTITUTE

Substitutes new text for old text in a text string

Syntax

SUBSTITUTE(text, old_text, new_text, [instance_num])

Parameters

  • text: Required. The text or the reference to a cell containing text for which you want to substitute characters
  • old_text: Required. The text you want to replace
  • new_text: Required. The text you want to replace old_text with
  • instance_num: Optional. Specifies which occurrence of old_text you want to replace. If omitted, every occurrence is replaced

Example

=SUBSTITUTE("Quarter 1, 2024", "1", "2", 1)
Returns: StringSince: Excel 2003