Text

REPLACE

Change the characters at a particular position to new text.

Syntax

=REPLACE(old_text, start_num, num_chars, new_text)

Worked example

Change the final three characters of the lot number.

=REPLACE("LOT201",4,3,"875")

Result LOT875

Microsoft documentation

Check the arguments, supported editions and behavior of this function in Microsoft’s reference.

Microsoft reference

Search ExcelTutor