REPLACE

Replaces characters within a string.

Sample Usage

REPLACE("I use spreadsheet.com",3,3,"love")
REPLACE("2010",3,2,"20")

Syntax

REPLACE(text, position, length, new_text)

  • text - The text, a part of which will be replaced. 
  • position  - The position where the replacement will begin. 
  • length  - The number of characters to be replaced. 
  • new_text - The text which will be inserted in the original text. 

 

Examples

REPLACE("I use spreadsheet.com",3,3,"love") returns the phrase "I love spreadsheet.com".
REPLACE("2010",3,2,"20") returns "2020".

Notes

  • This function returns only text as output.