ReplaceText('Text','SearchText','ReplaceText')

Arguments

'Text'

Text signal or "text" with content to be replaced

'SearchText'

Text signal or "text" with the text to be replaced

'ReplaceText'

Text signal or "text" as replacement

Description

This function replaces all occurrences of 'SearchText' within 'Text' with 'ReplaceText'. All arguments can be text signals or static text. If you use static text in the formula, put it in double quotes. By using text signals, you can vary dynamically both the text to be replaced ('SearchText') and the replacement text ('ReplaceText'). Even the basic text ('Text'), which contains parts to be replaced, can be a text signal.

If you want to use double quotes in static text, then write two double quotes after each other.

Examples

The following table shows several simplyfied applications.

Arguments

'Text'

'SearchText'

'ReplaceText'

[TextSignal]

Value: AAA BBB CCC

"BBB"

[ReplaceTextSignal]

Wert: XXX

Formula

ReplaceText([TextSignal],"BBB",[ReplaceTextSignal])

Result

AAA XXX CCC

Arguments

'Text'

'SearchText'

'ReplaceText'

[TextSignal]

Value: AAA BBB CCC

[SearchTextSignal]

Value: BB CC

"XXX"

Formula

ReplaceText([TextSignal],[SearchTextSignal],"XXX")

Result

AAA BXXXC

Arguments

'Text'

'SearchText'

'ReplaceText'

"Hello Name"

"Name"

[ReplaceTextSignal]

Value: John

Formula

ReplaceText("Hello Name","Name",[ReplaceTextSignal])

Result

Hello John