\<bookmark_value\>SUBSTITUTE function\</bookmark_value\>

SUBSTITUTE

Substitutes new text for old text in a string.

Syntax

SUBSTITUTE("Text"; "SearchText"; "NewText" [; Occurrence])

\<emph\>text\</emph\> is the text in which text segments are to be exchanged.

\<emph\>search_text \</emph\>is the text segment that is to be replaced (a number of times).

\<emph\>new text\</emph\> is the text that is to replace the text segment.

\<emph\>occurrence\</emph\> (optional) indicates which occurrence of the search text is to be replaced. If this parameter is missing the search text is replaced throughout.

דוגמה

SUBSTITUTE("123123123"; "3"; "abc") returns \<emph\>12abc12abc12abc\</emph\>.

SUBSTITUTE("123123123"; "3"; "abc"; 2) returns \<emph\>12312abc123\</emph\>.

Please support us!