# SUBSTITUTE Function

The SUBSTITUTE function is one of the text and data functions. Is used to replace a set of characters with a new one.

The SUBSTITUTE function syntax is:

SUBSTITUTE(string, old-string, new-string [, occurence])

where

string is the string to perform the substitution within.

old-string is the string to replace.

new-string is the string to replace with.

occurence is the number of occurences to repleace. It is an optional argument, if omitted, the function will replace all the occurences within string.

The data can be entered manually or included into the cells you make reference to.

To apply the SUBSTITUTE function,

1. select the cell where you wish to display the result,
2. click the Insert Function icon situated at the top toolbar,
   or right-click within a selected cell and select the Insert Function option from the menu,
   or click the icon situated at the formula bar,
3. select the Text and data function group from the list,
4. click the SUBSTITUTE function,
5. enter the required arguments separating them by comma,
6. press the Enter button.

The result will be displayed in the selected cell.