Manuals/calci/REPLACEARRAY
Jump to navigation
Jump to search
REPLACEARRAY(Array,Match,Replacement)
- where is the original or old text
- is the matching character in old text
- is the new text that replaces the matching characters in old text
REPLACEARRAY() replaces the characters from the original string with mentioned characters or string.
Description
REPLACEARRAY(Array,Match,Replacement)
For Example,
REPLACEARRAY("WELCOME","L","***") returns WE***COME
In above example, original text is replaced with new text from 4th character to next 4 characters.
- and should be enclosed in quotes.
- and should be positive numbers.
- If and are non-integers, they are truncated.
- If > 'length of ' , Calci assumes it to be '0'(zero) and new text is appended before old text.
- If any arguments are invalid, Calci displays an #ERROR message.
Examples
ColumnA | ColumnB | ColumnC |
123456 | ||
replace | ||
ABCDEF | ||
Mango | ||
=REPLACE(A1,2,1,"two") : Replaces second character from old text with "two". Returns 1two3456 as output. =REPLACE(A2,3,5,"PLACE") :Replaces 5 characters from old text starting from 3rd position with upper case "PLACE". Returns rePLACE as output. =REPLACE(A3,6,1,"fghijk") : Replaces 6th character from old text with lower case "fghijk". Returns ABCDEfghijk as output. =REPLACE(A4,8,1,"Apple ") : Appends "Apple " before old text as snum is greater than length of old text. Returns Apple Mango as output.
Related Videos
See Also
References