Use the SUBSTITUTE function when you want to replace text based on matching, not position.
Optionally, you’re able to specify the instance of found text to replace (i.e.
first instance, second instance, etc.).
To replace one or more characters with nothing, enter anempty string("").
However, SUBSTITUTE can be nested inside of itself to accomplish the same thing.
Related functions
Use theREPLACE functionto replace text at a known location in a text string.
Use theSUBSTITUTE functionto replace text by searching when the location is not known.
UseFINDorSEARCHto determine the location of specific text.
For example =REPLACE(“XYZ123”,4,3,“456”) returns “XYZ456”.