SUBSTITUTE and REPLACE functions in Excel

This example shows the difference between a function SUBSTITUTE (SUBSTITUTE) and REPLACE (REPLACE).

  1. If you know exactly what text will be replaced, use the function SUBSTITUTE (SUBSTITUTE).

    =SUBSTITUTE(A1,"2010","2013")

    =ПОДСТАВИТЬ(A1;"2010";"2013")

  2. The function SUBSTITUTE (SUBSTITUTE) has a 4th additional argument. You can use it to specify exactly which occurrences to replace.

    =SUBSTITUTE(A1,"2010","2013",2)

    =ПОДСТАВИТЬ(A1;"2010";"2013";2)

  3. If you know the position of the text to be replaced, use the function REPLACE (REPLACE).

    =REPLACE(A1,1,3,"C")

    =ЗАМЕНИТЬ(A1;1;3;"C")

Note: The function replaces 3 characters starting from the 1st character.

Leave a Reply