Skip to main content

REPLACE

Replaces part of a string value, based on the number of specified characters, with a different text.

Syntax

=REPLACE(OldText, StartPos, NumChars, NewText)

Arguments

NameDescription
OldTextString in which to replace characters.
StartAtCharacter position in OldText at which replace starts.
NumCharsNumber of characters from StartAt to be replaced by NewText.
NewTextThe text which will replace specified characters in OldText.

Return Value

The replaced Text.

Example

FunctionResult
=REPLACE("Replace me now", 12, 3, "later")"Replace me later"