SheetRocks
Documentation/Formulas/REPLACE

REPLACE

Replaces part of a text string with a different text string

Syntax

REPLACE(old_text, start_num, num_chars, new_text)

Arguments

Argument Description Required
old_text The text in which you want to replace characters Required
start_num The position of the first character you want to replace Required
num_chars The number of characters you want to replace Required
new_text The new text that will replace the old text Required

Examples

Replace characters in middle of text

=REPLACE("Hello World", 7, 5, "Universe")
Result ⇒ Hello Universe

Replace beginning of text

=REPLACE("2023-01-01", 1, 4, "2024")
Result ⇒ 2024-01-01

Replace text from cell

=REPLACE(A1, 9, 6, "XYZ789")
Result ⇒ Product XYZ789
A
1 Product ABC123

Related Functions

Other Text functions:


← Back to Formula Reference