replace

Previous chapterNext chapter Show allShow all    Hide allHide all

The function replace (string, numStart, numLen, stringNew) replaces starting from the character position (numStart) a number of characters (numLen) in a text string (string) with characters from a new string (stringNew).

Syntax: =replace(string,numStart,numLen,stringNew)

Example Example

Cell A1 = abc
Cell A2 = 3
=rept(A1,A2) is abcabcabc

In this exmple the character "cd" (3 positions in String, number 2 charactes) in String "abcdefgh" is replaced by "xyz".