Difference between revisions of "Documentation/How Tos/Calc: REPLACE function"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 50: Line 50:
 
* Excel and the forthcoming ODFF standard allow <tt>'''length'''</tt> to be zero.
 
* Excel and the forthcoming ODFF standard allow <tt>'''length'''</tt> to be zero.
  
{{Documentation/SeeAlso|
+
{{SeeAlso|EN|
 
* [[Documentation/How_Tos/Calc: SUBSTITUTE function|SUBSTITUTE]]
 
* [[Documentation/How_Tos/Calc: SUBSTITUTE function|SUBSTITUTE]]
 
* [[Documentation/How_Tos/Calc: FIND function|FIND]]
 
* [[Documentation/How_Tos/Calc: FIND function|FIND]]

Revision as of 07:49, 17 July 2018


REPLACE

Replaces part of a text string with a different text string.

Syntax:

REPLACE(originaltext; startposition; length; newtext)

in originaltext, removes length characters beginning at character startposition, replaces them with newtext, and returns the result.
startposition and length must be 1 or more.

Example:

REPLACE("mouse"; 2; 3; "ic")

returns mice. Beginning at character position 2, 3 characters (ous) are removed and replaced by ic.

Issues:

  • Excel and the forthcoming ODFF standard allow length to be zero.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_REPLACE_function&oldid=243406"
Views
Personal tools
Navigation
Tools