Difference between revisions of "Documentation/How Tos/Calc: REPLACE function"
From Apache OpenOffice Wiki
< Documentation | How Tos
m |
|||
Line 31: | Line 31: | ||
* [[Documentation/How_Tos/Calc:_TEXT_function|<div style="font-size: 120%;">Text]] | * [[Documentation/How_Tos/Calc:_TEXT_function|<div style="font-size: 120%;">Text]] | ||
* [[Documentation/How_Tos/Calc:_TRIM_function|<div style="font-size: 120%;">Trim]] | * [[Documentation/How_Tos/Calc:_TRIM_function|<div style="font-size: 120%;">Trim]] | ||
+ | * [[Documentation/How_Tos/Calc:_UNICHAR_function|<div style="font-size: 120%;">Unichar]] | ||
+ | * [[Documentation/How_Tos/Calc:_UNICODE_function|<div style="font-size: 120%;">Unicode]] | ||
* [[Documentation/How_Tos/Calc:_UPPER_function|<div style="font-size: 120%;">Upper]] | * [[Documentation/How_Tos/Calc:_UPPER_function|<div style="font-size: 120%;">Upper]] | ||
* [[Documentation/How_Tos/Calc:_VALUE_function|<div style="font-size: 120%;">Value]] | * [[Documentation/How_Tos/Calc:_VALUE_function|<div style="font-size: 120%;">Value]] |
Revision as of 11:28, 29 January 2024
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