Skip to main content

SUBSTITUTE

Definition

Replaces existing text with new text in a string.

Sample Usage

Syntax

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

  • text_to_search - The text within which to search and replace.

  • search_for - The string to search for within text_to_search.

    • search_for will match parts of words as well as whole words; therefore a search for "vent" will also replace text within "eventual".
  • replace_with - The string that will replace search_for.

  • occurrence_number - [ OPTIONAL ] - The instance of search_for within text_to_search to replace withreplace_with. By default, all occurrences of search_for are replaced; however, if occurrence_number is specified, only the indicated instance of search_for is replaced.

Notes

SUBSTITUTE can be used to replace one or all instances of a string within text_to_search. It cannot be used to replace multiple, but not all instances within a single call.This function returns text as the output. If a number is desired, try using the VALUE function in conjunction with this function.

See Also

TEXT: Converts a number into text according to a specified format.

REPLACE: Replaces part of a text string with a different text string.

 

 

In order to use the AVERAGE SUBSTITUTE formula, start with your edited Excellentable

 

 

 

 

 

A
B
C
D
1
cell_context
search_text
new_text
occurrence
2
Addteq Docs
dd
DD
1
3
xcellentable
e
E
2
4
xcellentable
e
E
3
5
xcellentable
e
E
E
F
1
SUBSTITUTE
2
ADDteq Docs
3
xcellEntable
4
xcellentablE
5
xcEllEntablE

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.