Reference
No results for 'undefined'
    Powered by Algolia

    SUBSTITUTE

    Replaces existing text with new text in a string.

    Syntax

    =SUBSTITUTE(searchText, searchFor, replaceWith, [occurrenceNumber])

    Parameters

    1. searchText
      • Type: String
      • Description: The text within which to search and replace.
    2. searchFor
      • Type: String
      • Description: The string to search for within searchText.
    3. replaceWith
      • Type: String
      • Description: The string that will replace searchFor.
    4. occurrenceNumber [optional]
      • Type: Integer
      • Description: The instance of searchFor within searchText to replace with replaceWith. By default, all occurrences of searchFor are replaced; however, if occurrenceNumber is specified, only the indicated instance of searchFor is replaced.

    Returns

    • Type: String
    • Description: Returns the resulting string

    Example

    =SUBSTITUTE(A2, "word", "Word", 2)

    Try It Now

    Sorry, your browser is not supported. MINTDATA™ works best on Google Chrome 50.0+ and Firefox 44.0+.

    See Also

    Contents