Returns a modification of the specified text where all occurrences of a text are replaced with another text.
Syntax Copy Code |
---|
SUBSTITUTE( Text text, Text old, Text new, [Integer which] ) → Text |
If which is omitted every occurrence of old is substituted. If which is less than or equal to 0, the function returns the #VALUE! error value. If which is not integer, it is automatically truncated.
If there is no match, or if old has zero length, the value of text is returned unchanged.
Formula Copy Code |
---|
=SUBSTITUTE(A2,"Sales","Cost") |
Function Reference
LEFT Function
LEN Function
MID Function
REPLACE Function
RIGHT Function