SUBSTITUTE Function

Replaces part of a text string with a different text string.

Syntax

SUBSTITUTE (text, old_text, new_text[, start_num][,ignore_case_opt)

Remarks

Use the SUBSTITUTE function when you want to replace specific text in a text string. If you want to replace text that occurs in a specific location in a text string, use the REPLACE function.

Example

SUBSTITUTE ("1 January 2003", "January", "JAN")

Returns "1 JAN 2003".

SUBSTITUTE ("1 January 2003","january","JAN")

Returns "1 January 2003". No change is made because the text search is case-sensitive.