Syntax

=REPLACE(old_text, start_num, num_chars, new_text)

Example

=REPLACE(A1,1,3,"XXX")

When to Use It

Use REPLACE when you know exactly which character positions need to change — e.g. masking the first 3 digits of an account number regardless of what those digits are.