Funções de texto
Essa seção contém descrições das funções de Texto.
Inserir - Função - Categoria Texto
Utilizar aspas duplas em fórmulas
Para incluir um texto numa fórmula, coloque o texto entre aspas duplas (") e o Calc irá interpretá-los. Por exemplo, a fórmula "Olá mundo!" exibe o texto Olá mundo! na célula, sem aspas duplas ao redor.
A fórmula mais complexa =CONCATENAR ("A vida é realmente simples, "; "mas insistimos em torná-la complicada "; "(Confúcio).") concatena três textos individuais entre aspas duplas, gerando A vida é muito simples, mas insistimos em torná-la complicada (Confúcio).
Para colocar aspas duplas literalmente num texto dentro de uma fórmula, dois métodos podem ser usados:
-
Você pode "escapar" as aspas duplas com aspas duplas adicionais, e o Calc trata as aspas duplas de escape como um valor literal. Por exemplo, a fórmula ="Meu nome é ""João""." retorna o texto Meu nome é "João". Outro exemplo simples é a fórmula =UNICODE ("""") que retorna 34 , o valor decimal do caractere de aspas Unicode (U+0022) - aqui a primeira e a quarta aspas duplas indicam o início e fim do texto, enquanto a segunda aspa dupla escapa da terceira.
-
Você pode usar a função CARACT ou a função CARACT.UNICODE para inserir aspas duplas. Por exemplo, a fórmula =CARACT.UNICODE(34) & "Gabriela, Cravo e Canela" & CARACT.UNICODE(34) & "é um livro famoso de Jorge Amado." exibe o texto "Gabriela, Cravo e Canela" é um livro famoso de Jorge Amado.
Tenha em conta que a função de Autocorreção do Calc pode modificar aspas duplas. A Autocorreção não deve alterar as aspas duplas nas células de fórmula, mas pode alterar aquelas usadas em células que não são de fórmula que contêm texto. Por exemplo, se copiar uma string envolta por alguma outra forma de aspas duplas tipográficas, como as aspas duplas à esquerda (U+201C) e as aspas duplas à direita (U+201D), e depois colar em um célula de fórmula, pode ocorrer um erro. Abra a área Aspas duplas da caixa de diálogo para definir os caracteres usados para corrigir automaticamente as aspas duplas tipográficas iniciais e finais. Desmarque o botão de alternância para desativar o recurso.
Texto vazio e células em branco
Células com texto vazio ("") não são equivalentes a células em branco. Ao pesquisar ou calcular com texto, o texto vazio "" é o texto com comprimento zero.
Por exemplo, quando a fórmula em A1 retorna o texto vazio "", o seguinte se aplica:
=ÉCÉL.VAZIA(A1) retorna FALSO. A célula não está vazia.
=ÉFÓRMULA(A1) retorna VERDADEIRO. A célula contém uma fórmula.
=ÉLÓGICO(A1) retorna FALSO. Não é um valor lógico.
=É.NÃO.TEXTO(A1) retorna FALSO. A célula contém um texto vazio.
=ÉNUM(A1) retorna FALSO. Não é um número.
=ÉTEXTO(A1) retorna VERDADEIRO. A célula tem um texto vazio, calculado por uma fórmula.
=NÚM.CARACT(A1) retorna 0. O tamanho to texto vazio é 0.
Retorna o valor numérico correspondente a um número romano expresso como texto.
Converte caracteres de duplo byte (largura inteira) para caracteres ASCII de byte único (meia largura) e caracteres katakana.
Converts a number to Thai text, including the Thai currency names.
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.
Converts a number into a character according to the current code table. The number can be a two-digit or three-digit integer number.
All non-printing characters are removed from the string.
Returns a numeric code for the first character in a text string.
Combines several text strings into one string.
Converts text that represents a number in a numeral system with the given base radix to a positive integer. The radix must be in the range 2 to 36. Spaces and tabs are ignored. The Text field is not case-sensitive.
Converts a number to a string representing the amount in the currency format, rounded to a specified decimal places, using the decimal separator that corresponds to the current locale setting. In the Value field enter the number to be converted. Optionally, you may enter the number of decimal places in the Decimals field. If no value is specified, all numbers in currency format will be displayed with two decimal places.
Compares two text strings and returns TRUE if they are identical. This function is case-sensitive.
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.
Returns a number as text with a specified number of decimal places and optional thousands separators.
Converte caracteres ASCII ou katakana de byte único (meia largura) em caracteres de byte duplo (largura total).
Returns the first character or characters of a text.
Returns the first characters of a DBCS text.
Returns the length of a string including spaces.
For double-byte character set (DBCS) languages, returns the number of bytes used to represent the characters in a text string.
Converts all uppercase letters in a text string to lowercase.
Returns a text string of a text. The parameters specify the starting position and the number of characters.
Returns a text string of a DBCS text. The parameters specify the starting position and the number of characters.
Capitalizes the first letter in all words of a text string.
Corresponde e extrai ou, opcionalmente, substitui o texto usando expressões regulares.
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 VALUE function.
Repeats a character string by the given number of copies.
Returns the last character or characters of a text.
Returns the last character or characters of a text with double bytes characters sets (DBCS).
Converte um número em um numeral romano. O intervalo de valores deve estar entre 0 e 3999. Um modo de simplificação pode ser especificado no intervalo de 0 a 4.
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).
Substitutes new text for old text in a string.
This function returns the target text, or a blank text string if the target is not text.
Converts a value into text according to a given format.
Removes spaces from a string, leaving only a single space character between words.
Converts a code number into a Unicode character or letter.
Returns the numeric code for the first Unicode character in a text string.
Converts the string specified in the text field to uppercase.
Converte a representação em texto de um número para sua forma numérica. Se o texto fornecido for uma data, hora ou data-hora válida, retorna o número de série da data-hora correspondente é.
Obtém o conteúdo internet de um endereço URI.
Aplica uma expressão XPath a um documento XML
Retorna uma cadeia de caracteres com codificação de URL.