Excel REPLACE function

Summary

The Excel REPLACE function replaces part of a text string with a different text string.

This function is useful for inserting text and/or correcting misspellings in Excel.

The REPLACE function is an Excel text function.

Function

=REPLACE(old_text, start_num, num_chars, new_text)

Arguments (inputs)

old_text = the original text string to be updated, can be a value or cell reference

start_num = the position of the character in old_text to begin replacing with the new_text string

num_chars = the number of characters in old_text to be replaced

new_text = the text string to replace characters in old_text with

Return value

The REPLACE function returns an updated text string, where a portion of the old_text has been updated with the new_text string.

Example

Excel REPLACE function example

In the example above the REPLACE function corrects the spelling of the misspelled first names in column C and returns the correct customer names in column K. In cell K6, the REPLACE function replaces the 4th character, “u”, with “i”.

=REPLACE(C6, 4, 1, “i”)

The result returned in cell K6 is “Claire Gute”