text functions - libreoffice help
DESCRIPTION
helps easy fuctions of libre officeTRANSCRIPT
-
5/21/2018 Text Functions - LibreOffice Help
1/14
From LibreOffice Help
EN AST BG BN BN-IN CA CS DA DE EL ES EU FI FR HU IT JA KM KONB NL OM PL PT PT-BR RU SL SV TR VI ZH-CN ZH-TW
This section contains descriptions of the Textfunctions.
Insert - Function- Category Text
1 VALUE1.1 Syntax
1.2 Example2 UPPER
2.1 Syntax2.2 Example
3 UNICODE3.1 Syntax3.2 Example
4 UNICHAR4.1 Syntax4.2 Example
5 TRIM5.1 Syntax5.2 Example
6 TEXT6.1 Syntax6.2 Example
7 T7.1 Syntax7.2 Example
8 SUBSTITUTE8.1 Syntax
8.2 Example9 SEARCH
9.1 Syntax9.2 Example
10 ROMAN10.1 Syntax10.2 Example
11 RIGHT11.1 Syntax11.2 Example
12 REPT12.1 Syntax12.2 Example
13 REPLACE13.1 Syntax
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
1 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
2/14
13.2 Example14 PROPER
14.1 Syntax14.2 Example
15 MID15.1 Syntax15.2 Example
16 LOWER16.1 Syntax16.2 Example
17 LEN
17.1 Syntax17.2 Example
18 LEFT18.1 Syntax18.2 Example
19 JIS19.1 Syntax
20 FIXED20.1 Syntax20.2 Example
21 FIND21.1 Syntax
21.2 Example22 EXACT
22.1 Syntax
22.2 Example23 DOLLAR
23.1 Syntax23.2 Example24 DECIMAL
24.1 Syntax24.2 Example
25 CONCATENATE25.1 Syntax
25.2 Example26 CODE
26.1 Syntax
26.2 Example
27 CLEAN27.1 Syntax
28 CHAR28.1 Syntax28.2 Example
29 BASE29.1 Syntax29.2 Example
30 BAHTTEXT30.1 Syntax30.2 Example
31 ASC31.1 Syntax
32 ARABIC32.1 Syntax
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
2 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
3/14
32.2 Example33 Related Topics
Converts a text string into a number.
Syntax
VALUE("Text " )
Textis the text to be converted to a number.
Example
=VALUE("4321") returns 4321.
Converts the string specified in the textfield to uppercase.
Syntax
UPPER( "Text " )
Textrefers to the lower case letters you want to convert to upper case.
Example
=UPPER( "Good Mor ni ng") returns GOOD MORNING.
Returns the numeric code for the first Unicode character in a text string.
Syntax
UNICODE("Text")
Example
=UNICODE("") returns the Unicode number 169 for the Copyright character.
Converts a code number into a Unicode character or letter.
Syntax
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
3 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
4/14
UNICHAR(number)
Example
=UNICHAR(169) returns the Copyright character .
Removes spaces from a string, leaving only a single space character between words.
Syntax
TRI M( "Text ")
Textrefers to text in which spaces are to be removed.
Example
=TRI M( " hel l o wor l d " ) returns hello world without leading and trailing spaces and with single space
between words.
Converts a number into text according to a given format.
Syntax
TEXT( Number; For mat )
Numberis the numerical value to be converted.
Formatis the text which defines the format. Use decimal and thousands separators according to the
language set in the cell format.
Example
=TEXT( 12. 34567; " ###. ##") returns the text 12.35
=TEXT(12. 34567; "000. 00") returns the text 012.35
This function returns the target text, or a blank text string if the target is not text.
Syntax
T( Val ue)
If Valueis a text string or refers to a text string, T returns that text string; otherwise it returns a blank text
string.
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
4 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
5/14
Example
=T( 12345) returns an empty string.
=T( "12345") returns the string 12345.
Substitutes new text for old text in a string.
Syntax
SUBSTI TUTE( "Text " ; " SearchText " ; " NewText " ; Occur r ence)
Textis the text in which text segments are to be exchanged.
SearchTextis the text segment that is to be replaced (a number of times).
NewTextis the text that is to replace the text segment.
Occurrence(optional) indicates which occurrence of the search text is to be replaced. If this parameter is
missing the search text is replaced throughout.
Example
=SUBSTI TUTE( "123123123"; "3"; "abc" ) returns 12abc12abc12abc.
=SUBSTI TUTE( "123123123"; "3"; "abc" ; 2) returns 12312abc123.
Returns the position of a text segment within a character string. You can set the start of the search as an
option. The search text can be a number or any sequence of characters. The search is not case-sensitive.
The search supports regular expressions. You can enter "all.*", for example to find the first location of "all"
followed by any characters. If you want to search for a text that is also a regular expression, you must
precede every character with a \ character. You can switch the automatic evaluation of regular expression on
and off in Tools - Options - LibreOffice Calc - Calculate.
Syntax
SEARCH( "Fi ndText " ; "Text " ; Posi t i on)
FindTextis the text to be searched for.
Textis the text where the search will take place.
Position(optional) is the position in the text where the search is to start.
Example
=SEARCH( 54; 998877665544) returns 10.
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
5 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
6/14
Converts a number into a Roman numeral. The value range must be between 0 and 3999, the modes can be
integers from 0 to 4.
Syntax
ROMAN( Number ; Mode)
Numberis the number that is to be converted into a Roman numeral.
Mode(optional) indicates the degree of simplification. The higher the value, the greater is the simplification
of the Roman number.
Example
=ROMAN(999) returns CMXCIX
=ROMAN( 999; 0) returns CMXCIX
=ROMAN ( 999; 1) returns LMVLIV
=ROMAN( 999; 2) returns XMIX
=ROMAN( 999; 3) returns VMIV
=ROMAN( 999; 4) returns IM
Returns the last character or characters of a text.
Syntax
RI GHT( "Text " ; Number )
Textis the text of which the right part is to be determined.
Number(optional) is the number of characters from the right part of the text.
Example
=RI GHT( "Sun"; 2) returns un.
Repeats a character string by the given numberof copies.
Syntax
REPT( "Text " ; Number)
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
6 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
7/14
Textis the text to be repeated.
Numberis the number of repetitions.
The result can be a maximum of 255 characters.
Example
=REPT( "Good mor ni ng"; 2) returns Good morningGood morning.
Replaces part of a text string with a different text string. This function can be used to replace both characters
and numbers (which are automatically converted to text). The result of the function is always displayed as
text. If you intend to perform further calculations with a number which has been replaced by text, you will
need to convert it back to a number using the VALUEfunction.
Any text containing numbers must be enclosed in quotation marks if you do not want it to be interpreted as anumber and automatically converted to text.
Syntax
REPLACE( "Text" ; Posi t i on; Lengt h; "NewText " )
Textrefers to text of which a part will be replaced.
Positionrefers to the position within the text where the replacement will begin.
Lengthis the number of characters in Textto be replaced.
NewTextrefers to the text which replaces Text.
Example
=REPLACE( "1234567"; 1; 1; "444") returns "444234567". One character at position 1 is replaced by the
complete NewText .
Capitalizes the first letter in all words of a text string.
Syntax
PROPER( "Text ")
Textrefers to the text to be converted.
Example
=PROPER( "open of f i ce" ) returns Open Office.
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
7 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
8/14
Returns a text string of a text. The parameters specify the starting position and the number of characters.
Syntax
MI D( "Text " ; Star t ; Number )
Textis the text containing the characters to extract.
Startis the position of the first character in the text to extract.
Numberspecifies the number of characters in the part of the text.
Example
=MI D( "of f i ce"; 2; 2) returns ff.
Converts all uppercase letters in a text string to lowercase.
Syntax
LOWER( "Text " )
Textrefers to the text to be converted.
Example
=LOWER("Sun" ) returns sun.
Returns the length of a string including spaces.
Syntax
LEN( "Text " )
Textis the text whose length is to be determined.
Example
=LEN( "Good Af t ernoon" ) returns 14.
=LEN( 12345. 67) returns 8.
Returns the first character or characters of a text.
Syntax
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
8 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
9/14
LEFT( "Text " ; Number )
Textis the text where the initial partial words are to be determined.
Number(optional) specifies the number of characters for the start text. If this parameter is not defined, one
character is returned.
Example
=LEFT( "out put " ; 3) returns out.
The JIS function converts half-width to full-width ASCII and katakana characters. Returns a text string.
See http://wiki.documentfoundation.org/Calc/Features/JIS_and_ASC_functions for a conversion table.
Syntax
J I S( "Text " )
Textis the text that contains characters to be converted.
See also ASC function.
Returns a number as text with a specified number of decimal places and optional thousands separators.
Syntax
FI XED( Number ; Deci mal s; NoThousandsSepar at or s)
Numberrefers to the number to be formatted.
Decimalsrefers to the number of decimal places to be displayed.
NoThousandsSeparators(optional) determines whether the thousands separator is used. If the parameter is
a number not equal to 0, the thousands separator is suppressed. If the parameter is equal to 0 or if it ismissing altogether, the thousands separators of your current locale setting are displayed.
Example
=FI XED( 1234567. 89; 3) returns 1,234,567.890 as a text string.
=FI XED( 1234567. 89; 3; 1) returns 1234567.890 as a text string.
Looks for a string of text within another string. You can also define where to begin the search. The search
term can be a number or any string of characters. The search is case-sensitive.
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
9 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
10/14
Syntax
FI ND( "Fi ndText " ; "Text " ; Posi t i on)
FindTextrefers to the text to be found.
Textis the text where the search takes place.
Position(optional) is the position in the text from which the search starts.
Example
=FI ND( 76; 998877665544) returns 6.
Compares two text strings and returns TRUE if they are identical. This function is case-sensitive.
Syntax
EXACT( "Text 1"; "Text 2")
Text1refers to the first text to compare.
Text2is the second text to compare.
Example
=EXACT( "mi cr osyst ems" ; "Mi cr osyst ems" ) returns FALSE.
Converts a number to an amount in the currency format, rounded to a specified decimal place. In the Val ue
field enter the number to be converted to currency. Optionally, you may enter the number of decimal places
in the Deci mal sfield. If no value is specified, all numbers in currency format will be displayed with two
decimal places.
You set the currency format in your system settings.
Syntax
DOLLAR( Val ue; Deci mal s)
Valueis a number, a reference to a cell containing a number, or a formula which returns a number.
Decimalsis the optional number of decimal places.
Example
=DOLLAR(255) returns $255.00.
=DOLLAR( 367. 456; 2) returns $367.46. Use the decimal separator that corresponds to the current locale
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
10 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
11/14
setting.
Converts text with characters from a number system to a positive integer in the base radix given. The radix
must be in the range 2 to 36. Spaces and tabs are ignored. The Textfield is not case-sensitive.
If the radix is 16, a leading x or X or 0x or 0X, and an appended h or H, is disregarded. If the radix is 2, anappended b or B is disregarded. Other characters that do not belong to the number system generate an error.
Syntax
DECI MAL( "Text " ; Radi x)
Textis the text to be converted. To differentiate between a hexadecimal number, such as A1 and the
reference to cell A1, you must place the number in quotation marks, for example, "A1" or "FACE".
Radixindicates the base of the number system. It may be any positive integer between 2 and 36.
Example
=DECI MAL( "17"; 10) returns 17.
=DECI MAL( "FACE"; 16) returns 64206.
=DECI MAL( "0101"; 2) returns 5.
Combines several text strings into one string.
Syntax
CONCATENATE( "Text 1"; . . . ; "Text30" )
Text 1; Text 2; ...represent up to 30 text passages which are to be combined into one string.
Example
=CONCATENATE( "Good " ; "Mor ni ng " ; "Mr s. " ; "Doe") returns: Good Morning Mrs. Doe.
Returns a numeric code for the first character in a text string.
Syntax
CODE( "Text ")
Textis the text for which the code of the first character is to be found.
Codes greater than 127 may depend on your system's character mapping (for example iso-8859-1,
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
11 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
12/14
iso-8859-2, Windows-1252, Windows-1250), and hence may not be portable.
Example
=CODE( "Hi er onymus") returns 72, =CODE( "hi erogl yphi c" ) returns 104.
The code used here does not refer to ASCII, but to the code table currently loaded.
All non-printing characters are removed from the string.
Syntax
CLEAN( "Text " )
Textrefers to the text from which to remove all non-printable characters.
Converts a number into a character according to the current code table. The number can be a two-digit or
three-digit integer number.
Codes greater than 127 may depend on your system's character mapping (for example iso-8859-1,
iso-8859-2, Windows-1252, Windows-1250), and hence may not be portable.
Syntax
CHAR( Number )
Numberis a number between 1 and 255 representing the code value for the character.
Example
=CHAR(100) returns the character d.
="abc" & CHAR(10) & "def" inserts a newline character into the string.
Converts a positive integer to a specified base into a text from the numbering system. The digits 0-9 and the
letters A-Z are used.
Syntax
BASE( Number ; Radi x; [ Mi ni mumLengt h] )
Numberis the positive integer to be converted.
Radixindicates the base of the number system. It may be any positive integer between 2 and 36.
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
12 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
13/14
MinimumLength(optional) determines the minimum length of the character sequence that has been
created. If the text is shorter than the indicated minimum length, zeros are added to the left of the string.
Example
=BASE( 17; 10; 4) returns 0017 in the decimal system.
=BASE( 17; 2) returns 10001 in the binary system.
=BASE( 255; 16; 4) returns 00FF in the hexadecimal system.
Converts a number to Thai text, including the Thai currency names.
Syntax
BAHTTEXT( Number )
Numberis any number. "Baht" is appended to the integral part of the number, and "Satang" is appended to
the decimal part of the number.
Example
=BAHTTEXT( 12. 65) returns a string in Thai characters with the meaning of "Twelve Baht and sixty five
Satang".
The ASC function converts full-width to half-width ASCII and katakana characters. Returns a text string.
See http://wiki.documentfoundation.org/Calc/Features/JIS_and_ASC_functions for a conversion table.
Syntax
ASC( "Text " )
Textis the text that contains characters to be converted.
See also JIS function.
Calculates the value of a Roman number. The value range must be between 0 and 3999.
Syntax
ARABI C( "Text ")
Textis the text that represents a Roman number.
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
13 of 14 27/07/2014 10:34
-
5/21/2018 Text Functions - LibreOffice Help
14/14
Example
=ARABI C( "MXI V") returns 1014
=ARABI C( "MMI I " ) returns 2002
Calc Functions By Category (http://help.libreoffice.org/Calc/Functions_by_Category) in the LibreOffice
WikiHelp
Retrieved from "http://help.libreoffice.org/index.php?title=Calc/Text_Functions&oldid=748221"
Category: EN
EN
This page has been accessed 109,694 times.This page was last modified 21:45:36, 2014-02-20 by LibreOffice Help user WikiSysop.Content is available under the GNU Lesser General Public License (LGPLv3), unless otherwisespecified, originally based on OpenOffice.org help. "LibreOffice" and "The Document Foundation"are registered trademarks of their corresponding registered owners or are in actual use as trademarksin one or more countries. Their respective logos and icons are also subject to international copyright
laws. Use thereof is explained in our trademark policy unless otherwise noted.
Text Functions - LibreOffice Help https://help.libreoffice.org/Calc/Text_Functions
14 of 14 27/07/2014 10:34