Text Functions
This section contains descriptions of the Text functions.
UNICHAR
Converts a code number into a Unicode character or letter.
UNICHAR(number)
=UNICHAR(169) returns the Copyright character ©.
See also the UNICODE() function.
LENB
For double-byte character set (DBCS) languages, returns the number of bytes used to represent the characters in a text string.
LENB("Text")
Číslo je číslo, ktorého znamienko má byť zistené.
LENB("中") returns 2 (1 DBCS character consisting of 2 bytes).
LENB("中国") returns 4 (2 DBCS characters each consisting of 2 bytes).
LENB("office") returns 6 (6 non-DBCS characters each consisting of 1 byte).
=LENB("Good Afternoon") returns 14.
=LENB(12345.67) returns 8.
ASC
Funkcia ASC prevedie ASCII a katakana znaky plnej šírky na polovičnú šírku. Vracia textový reťazec.
See https://wiki.documentfoundation.org/Calc/Features/JIS_and_ASC_functions for a conversion table.
ASC("Text")
Text is the text that contains characters to be converted.
Viď. tiež funkcia JIS.
JIS
Funkcia JIS prevedie ASCII a katakana znaky polovičnej šírky na plnú šírku. Vráti textový reťazec
See https://wiki.documentfoundation.org/Calc/Features/JIS_and_ASC_functions for a conversion table.
JIS("Text")
Text is the text that contains characters to be converted.
Viď. tiež funkcia JIS.
REPLACE
Nahradí časť textového reťazca iným textovým reťazcom. Túto funkciu je možné využiť na náhradu znakov a čísel(ktoré sa automaticky prevedú na text). Výsledok funkcie sa vždy zobrazí ako text. Ak chcete s číslom po náhrade robiť ďalšie výpočty, musíte ho previesť späť na číslo pomocou funkcieVALUE function.
Text, ktorý obsahuje čísla, musí byť uzatvorený v zátvorkách. V opačnom prípade sa interpretuje ako číslo a automaticky sa prevedie na text.
REPLACE("Text"; Pozícia; Dĺžka; "NovýText")
Text refers to text of which a part will be replaced.
Position refers to the position within the text where the replacement will begin.
Length is the number of characters in Text to be replaced.
NewText refers to the text which replaces Text.
=REPLACE("1234567";1;1;"444") returns "444234567". One character at position 1 is replaced by the complete NewText.
SUBSTITUTE
Nahradí časť textu v reťazci iným textom.
SUBSTITUTE("Text"; "HľadanýText"; "NovýText"; Výskyt)
Text is the text in which text segments are to be exchanged.
SearchText is the text segment that is to be replaced (a number of times).
NewText is 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.
=SUBSTITUTE("123123123";"3";"abc") returns 12abc12abc12abc.
=SUBSTITUTE("123123123";"3";"abc";2) returns 12312abc123.
TRIM
Odstráni medzery z reťazca a ponechá medzi slovami iba jedno znakovú medzeru
TRIM("Text")
Text refers to text in which spaces are to be removed.
=TRIM(" hello world ") returns hello world without leading and trailing spaces and with single space between words.
REPT
Opakuje textový reťazec toľkokrát, koľkokrát je uvedené v parametri Číslo.
REPT("Text"; Číslo)
Text is the text to be repeated.
Číslo je číslo, ktoré bude testované.
Výsledok funkcie môže mať maximálne 255 znakov.
=REPT("Good morning";2) returns Good morningGood morning.
EXACT
Porovnáva dva reťazce a vráti TRUE, pokiaľ sú rovnaké Táto funkcia rozlišuje veľkosť písmen.
EXACT("Text1"; "Text2")
Text1 refers to the first text to compare.
Text2 is the second text to compare.
=EXACT("microsystems";"Microsystems") returns FALSE.
BASE
Prevedie kladné číslo na text v číselnej sústave s určeným základom. Použijú sa číslice 0-9 a písmená A-Z.
BASE(Číslo; Základ; [MinimálnaDĺžka])
Číslo je číslo, ktoré bude testované.
Radix indicates the base of the number system. It may be any positive integer between 2 and 36.
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.
=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.
UPPER
Prevedie reťazec v parametri text na veľké písmená.
UPPER("Text")
Text refers to the lower case letters you want to convert to upper case.
=UPPER("Good Morning") returns GOOD MORNING.
VALUE
Prevedie textový reťazec na číslo
VALUE("Text")
Text is the text to be converted to a number.
=LN(EXP(321)) vráti 321.
LOWER
Prevedie všetky veľké písmená v textovom reťazci na malé.
LOWER("Text")
Text refers to the text to be converted.
=LOG(7^4;7) vráti 4.
DOLLAR
Prevedie číslo na hodnotu s jednotkou meny a zaokrúhli na určitý počet desatinných miest. Ako parameter Hodnota zadajte číslo, ktoré chcete previesť na menu. Zvoliť je možné tiež zadať počet desatinných miest parametromDesatinné miesta Ak tento počet neurčíte, zobrazí sa výsledok na dve desatinné miesta.
Formát meny je nastavený podľa vášho systému.
DOLLAR(Hodnota; Desatinné miesta)
Value is a number, a reference to a cell containing a number, or a formula which returns a number.
Decimals is the optional number of decimal places.
=DOLLAR(255) vráti $255.00.
=DOLLAR(367.456;2) returns $367.46. Use the decimal separator that corresponds to the current locale setting.
ROMAN
Prevedie číslo na rímske číslice. Hodnota musí byť v rozsahu 0 až 3999, režim môže byť číslo 0 až 4.
ROMAN(Číslo;Režim)
Číslo znamená číslo, ktoré má byť zaokrúhlené.
Mode (optional) indicates the degree of simplification. The higher the value, the greater is the simplification of the Roman number.
=ROUND(2.5) vráti 3.
=COMBIN(3;2) vráti 3.
=COMBIN(3;2) vráti 3.
=COMBIN(3;2) vráti 3.
=COMBIN(3;2) vráti 3.
=COMBIN(3;2) vráti 3.
TEXT
Prevedie číslo na text podľa určeného formátu.
TEXT(Číslo; Formát)
Číslo je číslo, ktoré bude testované.
Format is the text which defines the format. Use decimal and thousands separators according to the language set in the cell format.
=TEXT(12.34567;"###.##") returns the text 12.35
=TEXT(12.34567;"000.00") returns the text 012.35
See also Number format codes: custom format codes defined by the user.
BAHTTEXT
Prevedie číslo na thajský text, vrátane názvov thajskej meny.
BAHTTEXT(Číslo)
Number is any number. "Baht" is appended to the integral part of the number, and "Satang" is appended to the decimal part of the number.
=BAHTTEXT(12.65) returns a string in Thai characters with the meaning of "Twelve Baht and sixty five Satang".
CHAR
Prevedie číslo na znak podľa aktuálnej prevodovej tabuľky. Číslo môže byť dvoj alebo trojciferné celé číslo.
CHAR(Číslo)
Number is a number between 1 and 255 representing the code value for the character.
=CHAR(100) returns the character d.
="abc" & CHAR(10) & "def" inserts a newline character into the string.
DECIMAL
Previesť text so znakmi z číselné sústavy na kladné číslo v danej sústave Sústava musí byť v rozsahu 2 až 36. Medzery a tabulátory sú ignorované. V poli Text Nezávisí na veľkosti znakov.
Ak použijete šestnástkovú sústavu, ignoruje sa počiatočné x, X, 0x alebo 0X a koncové h alebo H. Ak použijete dvojkovú sústavu, ignoruje sa koncové b alebo B. Iné znaky, ktoré nepatria do číselnej sústavy spôsobia chybu.
DECIMAL("Text"; Sústava)
Text is 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".
Radix indicates the base of the number system. It may be any positive integer between 2 and 36.
=DELTA(1;2) vráti 0.
=CELL("COL";D2) vracia 4.
=DELTA(1;2) vráti 0.
MIDB
Returns a text string of a DBCS text. The parameters specify the starting position and the number of characters.
MIDB("Text"; Start; Number_bytes)
Text is the text containing the characters to extract.
Start is the position of the first character in the text to extract.
Number_bytes specifies the number of characters MIDB will return from text, in bytes.
MIDB("中国";1;0) returns "" (0 bytes is always an empty string).
MIDB("中国";1;1) returns " " (1 byte is only half a DBCS character and therefore the result is a space character).
MIDB("中国";1;2) returns "中" (2 bytes constitute one complete DBCS character).
MIDB("中国";1;3) returns "中 " (3 bytes constitute one and a half DBCS character; the last byte results in a space character).
MIDB("中国";1;4) returns "中国" (4 bytes constitute two complete DBCS characters).
MIDB("中国";2;1) returns " " (byte position 2 is not at the beginning of a character in a DBCS string; 1 space character is returned).
MIDB("中国";2;2) returns " " (byte position 2 points to the last half of the first character in the DBCS string; the 2 bytes asked for therefore constitutes the last half of the first character and the first half of the second character in the string; 2 space characters are therefore returned).
MIDB("中国";2;3) returns " 国" (byte position 2 is not at the beginning of a character in a DBCS string; a space character is returned for byte position 2).
MIDB("中国";3;1) returns " " (byte position 3 is at the beginning of a character in a DBCS string, but 1 byte is only half a DBCS character and a space character is therefore returned instead).
MIDB("中国";3;2) returns "国" (byte position 3 is at the beginning of a character in a DBCS string, and 2 bytes constitute one DBCS character).
MIDB("office";2;3) returns "ffi" (byte position 2 is at the beginning of a character in a non-DBCS string, and 3 bytes of a non-DBCS string constitute 3 characters).
LEFTB
Returns the first characters of a DBCS text.
LEFTB("Text"; Number_bytes)
Text is the text where the initial partial words are to be determined.
Number_bytes (optional) specifies the number of characters you want LEFTB to extract, based on bytes. If this parameter is not defined, one character is returned.
LEFTB("中国";1) returns " " (1 byte is only half a DBCS character and a space character is returned instead).
LEFTB("中国";2) returns "中" (2 bytes constitute one complete DBCS character).
LEFTB("中国";3) returns "中 " (3 bytes constitute one DBCS character and a half; the last character returned is therefore a space character).
LEFTB("中国";4) returns "中国" (4 bytes constitute two complete DBCS characters).
LEFTB("office";3) returns "off" (3 non-DBCS characters each consisting of 1 byte).
RIGHTB
Returns the last character or characters of a text with double bytes characters sets (DBCS).
RIGHTB("Text"; Number_bytes)
Text is the text of which the right part is to be determined.
Number_bytes (optional) specifies the number of characters you want RIGHTB to extract, based on bytes.
RIGHTB("中国";1) returns " " (1 byte is only half a DBCS character and a space character is returned instead).
RIGHTB("中国";2) returns "国" (2 bytes constitute one complete DBCS character).
RIGHTB("中国";3) returns " 国" (3 bytes constitute one half DBCS character and one whole DBCS character; a space is returned for the first half).
RIGHTB("中国";4) returns "中国" (4 bytes constitute two complete DBCS characters).
RIGHTB("office";3) returns "ice" (3 non-DBCS characters each consisting of 1 byte).
FIND
Returns the position of 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.
FIND("FindText"; "Text"; Pozície)
FindText refers to the text to be found.
Text is the text where the search takes place.
Position (optional) is the position in the text from which the search starts.
=FIND(76;998877665544) returns 6.
SEARCH
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. If the text is not found, returns error 519 (#VALUE).
SEARCH("HľadanýText"; "Text"; Pozícia)
FindText is the text to be searched for.
Text is the text where the search will take place.
Position (optional) is the position in the text where the search is to start.
=SEARCH(54;998877665544) returns 10.
CONCATENATE
Spojí niekoľko reťazcov do jedného.
CONCATENATE("Text1"; ...; "Text30")
Text 1; Text 2; ... represent up to 30 text passages which are to be combined into one string.
=CONCATENATE("Good ";"Morning ";"Mrs. ";"Doe") returns: Good Morning Mrs. Doe.
ARABIC
Spočíta hodnotu rímskeho čísla. Hodnota musí byť v rozmedzí od 0 do 3999.
ARABIC("Text")
Text is the text that represents a Roman number.
=ABS(0) vráti 0.
=ABS(0) vráti 0.
T
Táto vráti cieľový text alebo prázdny reťazec, ak cieľ nie je text.
N(Hodnota)
Ak je Hodnota textový reťazec alebo odkaz na textový reťazec, T vráti tento reťazec; inak vráti prázdny textový reťazec .
=T(12345) returns an empty string.
=T("12345") returns the string 12345.
PROPER
Upraví prvé písmeno vo všetkých slovách textového reťazca na veľké
PROPER("Text")
Text refers to the text to be converted.
=PROPER("open office") returns Open Office.
LEN
Vráti dĺžku reťazca vrátane medzier.
LEN("Text")
Číslo je číslo, ktorého znamienko má byť zistené.
=LEN("Good Afternoon") returns 14.
=INT(5.7) vráti 5.
UNICODE
Vráti numerický kód prvého Unicode znaku reťazca.
UNICODE("Text")
=UNICODE("©") returns the Unicode number 169 for the Copyright character.
See also the UNICHAR() function.
CODE
Vráti numerický kód prvého znaku reťazca.
CODE("Text")
Text is the text for which the code of the first character is to be found.
=CODE("Hieronymus") returns 72, =CODE("hieroglyphic") returns 104.
Táto funkcia nepoužíva pre kódovanie kód ASCII, ale aktuálne načítanú kódovaciu tabuľku.
MID
Vráti pod reťazec textu. Parametre určujú počiatočnú pozíciu a počet znakov.
MID("Text"; Spustiť; Číslo)
Text is the text containing the characters to extract.
Start is the position of the first character in the text to extract.
Number specifies the number of characters in the part of the text.
=MINA(1;"Text";20) vracia 0.
RIGHT
Vráti posledný znak alebo znaky textu.
RIGHT("Text";Číslo)
Text is 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.
=CELL("COL";D2) vracia 4.
LEFT
Vráti prvý znak alebo znaky textu.
LEFT("Text"; Číslo)
Text is 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.
=CELL("COL";D2) vracia 4.
FIXED
Vráti číslo ako text s určeným počtom desatinných miest a voľiteľným oddeľovačom tisícov
FIXED(Číslo; Desatinné miesta; Nerozdeľovať tisíce)
Číslo je číslo, ktoré bude testované.
Decimals refers 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 is missing altogether, the thousands separators of your current locale setting are displayed.
=FIXED(1234567.89;3) returns 1,234,567.890 as a text string.
=FIXED(1234567.89;3;1) returns 1234567.890 as a text string.
CLEAN
Všetky netlačiteľné znaky sú z reťazca odstránené.
CLEAN("Text")
Text refers to the text from which to remove all non-printable characters.