The Excel REPLACE function is used to replace existing characters in a cell with a different set of characters, or with nothing. These unwanted characters can appear as a result of importing or copying data into Excel.
The syntax for the REPLACE function is:
=REPLACE(old_text, start_num, num_chars, new_text)
|Old_text||The text that you want to change. Usually entered as a cell reference|
|Start_num||The start position of the first character in old_text that you want to replace|
|Num_chars||The number of characters from start_num that you want to replace|
|New_text||The new data to be added. Leave it blank to just remove the unwanted characters|
The examples below show the REPLACE function being used change characters in an existing cell.