REPLACE
TextExcel 2007Overwrite characters at a fixed position with new text.
Syntax
REPLACE(old_text, start_num, num_chars, new_text)
Arguments
- old_text
- The original string.
- start_num
- Position of the first character to replace.
- num_chars
- How many characters to remove.
- new_text
- Text to insert.
Examples
=REPLACE("XXXX-1234", 1, 4, "9876")
→ 9876-1234
Related functions
More Text functions
Syntax follows Microsoft’s documentation. Examples are written to be pasted into a cell and checked. Argument separators may be ; in your locale. The AI explainer runs on a free community model — verify anything important.