Text Functions
This section contains descriptions of the Text functions.
AMACERAR
Devuelve una cadena de testu d'un testu. Los parámetros especifiquen la posición inicial y el númberu de caráuteres.
Sintaxis
ESTRAYI("Testu"; Empiezu; Númberu)
Testu ye'l testu que contién los caráuteres que se van a estrayer.
Entamu ye la posición del primer caráuter del testu que se va a estrayer.
Númberu especifica'l númberu de caráuteres na parte del testu.
Exemplu
=MID("office";2;2) devuelvi ff.
AMACERAR
Desanicia los espacios d'una cadena de caráuteres y dexa un solu espaciu ente pallabres.
Sintaxis
AMACERAR("Testu")
Text refers to text in which spaces are to be removed.
Exemplu
=TRIM(" hello world ") returns hello world without leading and trailing spaces and with single space between words.
ASC
La función ASC convierte ASCII y caráuteres katakana a la metá del anchu normal.
See https://wiki.documentfoundation.org/Calc/Features/JIS_and_ASC_functions for a conversion table.
Sintaxis
ASC("Testu")
Testu ye'l testu que contién los caráuteres que se van a convertir.
Ver tambien la función JIS.
ATOPAR
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.
Sintaxis
ATOPAR("Atopar_Testu"; "Testu"; Posición)
Atopar_Testu fai referencia al testu que se debe guetar.
Testu ye'l testu onde se realiza la busca.
Posición (opcional) ye la posición nel testu onde se va empecipiar la busca.
Exemplu
=BUSCAR(76;998877665544) devuelve 6.
BAHTTEXT
Convierte un númberu en testu tailandés, inclusive los nomes de monedes tailandeses.
Sintaxis
BAHTTEXT(Númberu)
Númberu ye cualquier númberu. "Baht" amestar a la parte entera del númberu y "Satang" amestar a la parte decimal del númberu.
Exemplu
=BAHTTEXT(12.65) devuelve una cadena de caráuteres tailandeses que representen "Dolce Baht y sesenta y cinco Satang".
BASE
Convierte un enteru positivu d'una base especificada en testu del sistema numbéricu. Utilícense los díxitos 0-9 y les lletres A-Z.
Sintaxis
BASE(Númberu; Raigañu; [LlonxitúMínima])
Númberu ye'l númberu enteru positivu tien de convertise.
Radix indica la base del sistema numbéricu. Pue ser cualquier númberu enteru positivu ente 2 y 36.
LongitudMínima (opcional) determina'l llargor mínimu de la secuencia de caráuteres que se creó. Si'l testu ye más curtiu que'l llargor mínimu indicada, amiéstense ceros a la izquierda de la cadena.
Exemplu
=BASE(17;10;4) devuelve 0017 nel sistema decimal.
=BASE(17;2) devuelve 10001 nel sistema binariu.
=BASE(255;16;4) devuelve 00FF nel sistema hexadecimal.
BUSCAR
Devuelve la posición d'un segmentu de testu dientro d'una cadena de caráuteres. Opcionalmente pue afitar l'entamu de la busca. El testu buscáu pue ser un númberu o una cadena de caráuteres. La busca nun estrema mayúscules de minúscules.
Sintaxis
BUSQUEDA("FindText"; "Testu"; Posición)
Atopar_Testu ye'l testu que se debe guetar.
Testu ye'l testu onde se realiza la busca.
Posición (opcional) ye la posición nel testu onde se va empecipiar la busca.
Exemplu
=BUSCAR(54;998877665544) devuelve 10.
CALTER
Convierte un númberu nun caráuter según la tabla de códigos actual. El númberu pue ser un enteru de dos o de tres dígito.
Sintaxis
CALTER(Númberu)
Númberu ye un númberu ente 1 y 255 que representa'l valor de códigu del caráuter.
Exemplu
=CALTER(100) devuelve'l caráuter d.
="abc" & CALTER(10) & "def" inxerta un caráuter de llinia nueva na cadena.
CONCATENAR
Combina delles cadenes de caráuteres nuna sola.
Sintaxis
CONCATENAR("Testu1"; ...; "Testu30")
Testu 1; Testu 2; ... representa hasta 30 fragmentos de testu que se van a combinar nuna cadena.
Exemplu
=CONCATENAR("Bonos ";"Díes ";"Sra. ";"López") devuelve: Bonos díes Sra. López.
CÓDIGU
Devuelve un códigu numbéricu pal primer caráuter d'una cadena de testu.
Sintaxis
CÓDIGU("Testu")
Testu ye'l testu pal que se va guetar el códigu del primer caráuter.
Exemplu
=CÓDIGU("Jerónimo") DEVUELVE 72, =CÓDIGU("xeroglíficu") devuelve 104.
El códigu utilizáu nesti casu nun ye'l códigu ASCII, sinón el códigu de la tabla de códigos actual.
DECIMAL
Convierte testu con caráuteres d'un sistema numbéricu a un enteru positivu na base dada. La base tien de tar nel rangu de 2 a 36. Los espacios y les tabulaciones ignórense. El campu deTestu nun estrema mayúscules y minúscules.
Si'l raigañu ye 16 van despreciase los caráuteres x, X, 0x o 0X que preciedan al testu, según los caráuteres h o H amestaos a la fin. Si'l raigañu ye 2 van despreciase los caráuteres b o B amestaos a la fin. Otros caráuteres que nun pertenezan al sistema numbéricu van provocar un fallu.
Sintaxis
DECIMAL("Testu"; Raigañu)
Testu ye'l testu que se debe convertir. Pa estremar ente un númberu hexadecimal, por exemplu A1 y la referencia a la caxella A1, tien d'escribir el númberu ente comines; por exemplu, "A1" o "FACE".
Radix indica la base del sistema numbéricu. Pue ser cualquier númberu enteru positivu ente 2 y 36.
Exemplu
=DECIMAL("17";10) devuelve 17.
=DECIMAL("FACE";16) devuelve 64206.
=DECIMAL("0101";2) devuelve 5.
DERECHA
Devuelve l'últimu caráuter o los últimos caráuteres d'un testu.
Sintaxis
DERECHA("Testu"; Númberu)
Testu ye'l testu pal que se va a determinar la parte derecha.
Númberu (opcional) ye'l númberu de caráuteres dende la parte derecha del testu.
Exemplu
=DERECHA("Ensin";2) devuelve un.
ESQUIERDA
Devuelve'l primer caráuter o los primeros caráuteres d'un testu.
Sintaxis
ESQUIERDA("Testu"; Númberu)
Testu ye'l testu onde les pallabres parciales iniciales tienen de determinase.
Númberu (opcional) especifica'l númberu de caráuteres pal testu inicial. Si nun se definió esti parámetru, devuélvese un caráuter.
Exemplu
=ESQUIERDA("salida";3) devuelve “sal”.
FIXU
Devuelve un númberu como testu con un númberu especificáu de decimales y separadores de miles opcionales.
Sintaxis
FIXU(númberu; Decimales; Nun dixebrar_millares)
Númberu fai referencia al númberu al que se va a dar formatu.
Decimales fai referencia al númberu de posiciones decimales que se van amosar.
Nun dixebrar_millares (opcional) determina si utiliza'l separador de millares. Si'l parámetru ye un númberu non igual a 0, esaníciase'l separador de millares. Si'l parámetru ye igual a 0 o si nun apaez n'absolutu, amuésense los separadores de millares de la configuración rexonal actual.
Exemplu
=FIXU(1234567,89;3) devuelve 1.234.567,890 como cadena de testu.
=FIXU(1234567,89;3) devuelve 1234567,890 como una cadena de testu.
IGUAL
Compara dos cadenes de testu y devuelve VERDADERU si son iguales. Esta función estrema ente mayúscules y minúscules.
Sintaxis
IGUAL("Testu1"; "Testu2")
Testu1 fai referencia al primer testu que se va comparar.
Testu2 ye'l segundu testu que se va comparar.
Exemplu
=IGUAL("microsystems";"Microsystems") devuelve FALSU.
JIS
La función JIS convierte ASCII y caráuteres de katakana de mediu anchor a anchu completu.
See https://wiki.documentfoundation.org/Calc/Features/JIS_and_ASC_functions for a conversion table.
Sintaxis
JIS("Testu")
Testu ye'l testu que contién los caráuteres que se van a convertir.
Ver tambien la función ASC.
LEFTB
Returns the first characters of a DBCS text.
Sintaxis
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.
Exemplos
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).
LENB
For double-byte character set (DBCS) languages, returns the number of bytes used to represent the characters in a text string.
Sintaxis
LENB("Text")
Testu ye'l testu que la so llargor tien de determinase.
Exemplos
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.
LLARGU
Calcula'l llargor d'una cadena, incluyíos los espacios.
Sintaxis
LLARGU("Testu")
Testu ye'l testu que la so llargor tien de determinase.
Exemplu
=LLARGU("Bones tardes") devuelve 13.
=LLARGU(12345.67) devuelve 8.
LLIMPIAR
Desanicia de la cadena tolos caráuteres que nun se puen imprentar.
Sintaxis
LLIMPIAR("Testu")
Testu fai referencia al testu del que se van desaniciar tolos caráuteres non imprentables.
MAYÚSC
Pasa la cadena especificada nel campu de testu a mayúscules.
Sintaxis
MAYÚSC("Testu")
Testu fai referencia a les lletres en minúscules que deseya convertir a mayúscules.
Exemplu
=MAYÚS("Bonos díes") devuelve BONOS DÍES.
MIDB
Returns a text string of a DBCS text. The parameters specify the starting position and the number of characters.
Sintaxis
MIDB("Text"; Start; Number_bytes)
Testu ye'l testu que contién los caráuteres que se van a estrayer.
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.
Exemplos
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).
MINUSC
Convierte toles lletres mayúscules d'una cadena de testu en minúscules.
Sintaxis
MINUSC("Testu")
Testu fai referencia al testu que se debe convertir.
Exemplu
=MINUSC("Sun";2) devuelvi sun.
MONEDA
Convierte un númberu pa una cantidá nel formatu de moneda, arredondiáu a un llugar decimal específicu. Nel campuValor introduza'l númberu que deseya convertir a moneda. Opcionalmente, pues introducir el númberu de posiciones decimales nel campu Decimales. Si nengún valor ye especificáu, tolos númberos nel formatu de moneda van amosar con dos asities decimales.
Tien De establecer el formatu de la divisa na configuración del sistema.
Sintaxis
FORGAR(Valor; Decimales)
Valor ye un númberu, una referencia a una caxella que contién un númberu o una fórmula que da como resultáu un númberu.
Decimales ye'l númberu opcional de posiciones decimales.
Exemplu
=MONEDA(255) devuelve $255,00.
=MONEDA(367,456;2) devuelve $367,46. Use'l separador decimal que se correspuenda a la configuración rexonal actual.
NOMPROPIO
Nel casu d'una cadena de testu, convierte en mayúscula la inicial de toles pallabres de la cadena.
Sintaxis
NOMPROPIO("Testu")
Testu fai referencia al testu que se debe convertir.
Exemplu
=NOMPROPIO("open office") devuelve Open Office.
REEMPLAZAR
Sustituyi parte d'una cadena de testu con una cadena de testu distinta. Esta función pue utilizase pa sustituyir caráuteres y númberos (que se converten automáticamente en testu). La resultancia de la función siempres ye un testu. Pa prosiguir cola operación de cálculu con un númberu trocáu por testu, ye precisu tresformar la resultancia de nuevu en númberu; pa ello, utilízase la función VALOR.
Si nun deseya qu'un testu que contenga númberos interprétese como númberu y conviértase en testu automáticamente tendrá d'escribilo ente comines.
Sintaxis
REEMPLAZAR("Testu"; Posición; Llargor; "testu_nuevu")
Testu fai referencia al testu del que se va sustituyir una parte.
Posición fai referencia a la posición del testu na que va empezar la sustitución.
Llargor ye'l númberu de caráuteres en Testu que se va a sustituyir.
testu_nuevu fai referencia al testu que sustitúi a Testu.
Exemplu
=REEMPLAZAR("1234567";1;1;"444") devuelvi "444234567". Un caráuter na posición 1 sustituyir pol testu_nuevu completu.
REPITIR
Repite una cadena de caráuteres el númberu de vegaes especificáu.
Sintaxis
REPITIR("Testu"; Númberu)
Testu ye'l testu que se debe repitir.
Númberu ye'l númberu de repeticiones.
La resultancia pue ser un máximu de 255 caráuteres.
Exemplu
=REPITIR("Bonos díes") devuelve Bonos díasBuenos díes.
RIGHTB
Returns the last character or characters of a text with double bytes characters sets (DBCS).
Sintaxis
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.
Exemplos
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).
ROMANU
Convierte un númberu en númberos romanos. El valor tien de tar ente 0 y 3999, les maneres puen ser númberos enteros de 0 a 4.
Sintaxis
ROMANU(númberu; mou)
Númberu ye'l númberu que se va a convertir a númberos romanos.
Mou (opcional) indica'l grau de simplificación. Cuanto mayor seya'l valor, mayor ye la simplificación del númberu romanu.
Exemplu
=ROMANU(999) devuelvi CMXCIX.
=ROMANU(999;0) devuelvi CMXCIX.
=ROMANU(999;1) devuelvi LMVLIV.
=ROMANU(999;2) devuelvi XMIX.
=ROMANU(999;3) devuelvi VMIV.
=ROMANU(999;4) devuelvi IM.
SUSTITUYIR
Troca un fragmentu de testu por otru nuevu dientro d'una cadena de caráuteres.
Sintaxis
SUSTITUYIR("Testu"; "Guetar_testu"; "testu_nuevu"; Escurrimientu)
Testu ye'l testu nel que se van a intercambiar los segmentos de testu.
Guetar_testu ye'l segmentu de testu que se va a sustituyir (un númberu de vegaes).
testu_nuevu ye'l testu que va sustituyir al segmentu de testu.
Apaición (opcional) indica l'apaición del testu buscáu que se va trocar. Si nun s'especifica esti parámetru, el testu de la busca va trocase perdayuri.
Exemplu
=SUSTITUYIR("123123123";"3";"abc") devuelve 12abc12abc12abc.
=SUSTITUYIR("123123123";"3";"abc";2) devuelve 12312abc123.
T
Esta función devuelve'l testu de destín, o una cadena de testu balera si'l destín nun ye testu.
Sintaxis
T(Valor)
Si Valuor ye una cadena de testu o se refier a una cadena de testu. T va devolver esa cadena; de lo contrario devolvera una cadena en balera.
Exemplu
=T(12345) devuelve una cadena balera.
=T("12345") devuelve la cadena 12345.
TESTU
Convierte un númberu en testu según un formatu determináu.
Sintaxis
TESTU(Númberu; formatu)
Númberu ye'l valor numbéricu que se debe convertir.
Formatu ye'l testu que define'l formatu. Use separadores de decimales y millares acordies con l'idioma definíu nel formatu de caxella.
Exemplu
=TESTU(12,34567;"###,##") devuelve'l testu 12,35.
=TESTU(12,34567;"000,00") devuelve'l testu 012,35.
UNICHAR
Convierte un númberu de códigu nun caráuter o lletra Unicode.
Sintaxis
UNICHAR(number)
Exemplu
=UNICHAR(169) da como resultáu'l caráuter de Copyright ©.
See also the UNICODE() function.
UNICODE
Devuelve'l códigu numbéricu del primer caráuter Unicode d'una cadena de testu.
Sintaxis
UNICODE("Text")
Exemplu
=UNICODE("©") devuelve'l númberu Unicode 169 pal caráuter de Copyright.
See also the UNICHAR() function.
VALOR
Convierte una cadena de testu nun númberu.
Sintaxis
VALOR("Testu")
Testu ye'l testu que se debe convertir nun númberu.
Exemplu
=VALOR("4321") devuelve 4321.
ÁRABE
Calcula'l valor d'un númberu romanu. El rangu de valores tien de tar entendíu ente 0 y 3999.
Sintaxis
ÁRABE("Testu")
Testu ye'l testu que representa un númberu romanu.
Exemplu
=ÁRABE("MXIV") devuelve 1014.
=ÁRABE("MMII") devuelve 2002.