Substitute vs Replace


This example shows the difference between SUBSTITUTE and REPLACE in Excel.

1a. If you know the text to be replaced, use the SUBSTITUTE function.

SUBSTITUTE function in Excel

1b. The SUBSTITUTE function has a 4th optional argument. You can use this argument to indicate which occurrence you want to substitute.

Substitute the Second Occurrence

2. If you know the position of the text to be replaced, use the REPLACE function.

REPLACE function in Excel

Note: started at position 1 with length 3.