MindFusion.Wpf Pack Programmer's Guide
SUBSTITUTE

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

Parameters

text
Required. The input text.
old
Required. The text to replace.
new
Required. The text to replace with.
which
Optional. Specifies (if not omitted) which occurrence to replace.

Remarks

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.

Example

Formula  Copy Code

=SUBSTITUTE(A2,"Sales","Cost")

See Also

Function Reference
LEFT Function
LEN Function
MID Function
REPLACE Function
RIGHT Function