Changes

no edit summary
Line 1: Line 1: −
=REPLACE(otext, snum, noc, ntext)=
+
<div style="font-size:30px">'''REPLACE (Old_Text,Start_Num,Num_Chars,New_Text) '''</div><br/>
   −
*where <math>otext</math> is the original or old text
+
*where <math>Old-Text</math> is the original or old text
*<math>snum</math> is the character position in old text
+
*<math>Start-Num</math> is the character position in old text
*<math>noc</math> is the number of characters to be replaced in old text
+
*<math>Num-Chars</math> is the number of characters to be replaced in old text
*<math>ntext</math> is the new text that replaces the characters in old text
+
*<math>New-Text</math> is the new text that replaces the characters in old text
 
+
**REPLACE(), replaces characters within text.
REPLACE() replaces a part of the text string with a different text string.
      
== Description ==
 
== Description ==
   −
REPLACE(otext, snum, noc, ntext)
+
REPLACE (Old_Text,Start_Num,Num_Chars,New_Text)  
    
For Example,
 
For Example,
Line 18: Line 17:  
In above example, original text is replaced with new text from 4th character to next 4 characters.
 
In above example, original text is replaced with new text from 4th character to next 4 characters.
   −
*<math>otext</math> and <math>ntext</math> should be enclosed in quotes.
+
*<math>Old-Text</math> and <math>New-Text</math> should be enclosed in quotes.
*<math>snum</math> and <math>noc</math> should be positive numbers.
+
*<math>Start-Num</math> and <math>Num-Chars</math> should be positive numbers.
*If <math>snum</math> and <math>noc</math> are non-integers, they are truncated.
+
*If <math>Start-Num</math> and <math>Num-Chars</math> are non-integers, they are truncated.
*If <math>snum</math> &gt; 'length of <math>otext</math>' , Calci assumes it to be '0'(zero) and new text is appended before old text.
+
*If <math>Start-Num</math> &gt; 'length of <math>Old-Text</math>' , 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.
 
*If any arguments are invalid, Calci displays an #ERROR message.
   Line 64: Line 63:  
  =REPLACE(A3,6,1,"fghijk") : Replaces 6th character from old text with lower case "fghijk". Returns '''ABCDEfghijk''' 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.
 
  =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==
 +
 +
{{#ev:youtube|BB-G5ucpy4I|280|center|REPLACE}}
    
== See Also ==
 
== See Also ==
Line 74: Line 77:     
*[http://en.wikipedia.org/wiki/Autocorrection Find and Replace]
 
*[http://en.wikipedia.org/wiki/Autocorrection Find and Replace]
 +
 +
 +
 +
*[[Z_API_Functions | List of Main Z Functions]]
 +
 +
*[[ Z3 |  Z3 home ]]
writer
6,694

edits