logo
excelfunctions.org
bookmarks

REPLACE

Replaces characters within text.

TextText CleaningText Processing

What it does

Replaces characters at a specific position with new text.

Syntax

REPLACE(old_text, start_num, num_chars, new_text)

Arguments

  • old_text(text) β€” Original text.
  • start_num(number) β€” Start position.
  • num_chars(number) β€” Chars to replace.
  • new_text(text) β€” Replacement.

Examples

Mask Text

Mask first 3 chars.

FORMULA
=REPLACE("123-456", 1, 3, "XXX")
RESULT
XXX-456
SAMPLE DATA
A
1Text
2123-456