SUBSTITUTE
Description
Replaces either one or all occurrences of old_text with new_text. The function is
case-sensitive.
Syntax
SUBSTITUTE(
text
,
old_text
,
new_text
, [
instance_num
])
- text: The text to replace characters in.
- old_text: The text to replace.
- new_text: The text to insert.
- instance_num: The occurrence of old_text to replace with new_text. If you don't specify aninstance_num, the function replaces all occurrences.
Example
Formula | Result |
|---|---|
=SUBSTITUTE(A1,"Sales","Marketing")
Where cell A1 contains
Regional Sales Manager
.
| Regional Marketing Manager |