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
| Argument | Required | What it means |
|---|---|---|
text_to_search | Yes | The text containing the characters or words to replace. |
search_for | Yes | The exact text to find. |
replace_with | Yes | The text inserted in place of each match. |
occurrence_number | No | The specific match to replace. All matches are replaced when omitted. |
Examples
Update a status label
| A | |
|---|---|
| 1 | Status |
| 2 | Pending 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.