=REPLACE(old_text,start_num,num_chars,new_text)
The REPLACE function can be used to replace characters in a string. For example, to replace the word "C" with the word "D" in the string "C:\docs", you would use the following formula:
=REPLACE("C:\docs",1,1,"D")
This would return the string "D:\docs".
The REPLACE function can also be used to replace a substring in a string. For example, to replace the substring "123" with the substring "456" in the string "XYZ123", you would use the following formula:
=REPLACE("XYZ123",4,3,"456")
This would return the string "XYZ456".
The REPLACE function can also be used to remove characters from a string. In this example, the REPLACE function returns "google.com" by removing the first four characters from "www.google.com":
=REPLACE("www.google.com",1,4,"")
The REPLACE function is used to replace a text string with another text string.