REPLACE function replaces a given number of characters at a given position of a text string with a given text string. For example the formula =REPLACE(“144-978-6872″,1,3,”XYZ”) will return XYZ-978-6872.
Replace a character or characters based on position.
old_text – Character or characters to replace
start_num – The position of the character in old_text that you want to replace with new_text.
num_chars – Number of characters to replace
new_text – The text that will replace characters in old_text.
REPLACE function replaces text based on position. To replace text based on content, use SUBSTITUTE function.