Intermediate
Text
REPLACE
Replaces a specific number of characters within a string, matched by position rather than by the text itself.
Compatibility: All Excel versions
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.