Google Sheets function

SUBSTITUTE function in Google Sheets

SUBSTITUTE in Google Sheets replaces matching text inside a string with new text. By default it replaces every occurrence, while the optional occurrence number limits the replacement to one match. Use SUBSTITUTE to update labels, separators, codes, or repeated terms.

Source: Google Docs Editors HelpLast verified Nov 5, 2026

Syntax

=SUBSTITUTE(text_to_search, search_for, replace_with, [occurrence_number])

Arguments

ArgumentRequiredWhat it means
text_to_searchYesThe text containing the characters or words to replace.
search_forYesThe exact text to find.
replace_withYesThe text inserted in place of each match.
occurrence_numberNoThe specific match to replace. All matches are replaced when omitted.

Examples

Update a status label

A
1Status
2Pending review
=SUBSTITUTE(A2,"Pending","Ready for")

Result: Ready for review

SUBSTITUTE replaces the matching word Pending with Ready for.

Common mistakes

Expecting a case-insensitive match.

Match the capitalization in the source text exactly.

Replacing every occurrence when only one should change.

Provide occurrence_number to target a specific match.