Aquesta secció conté descripcions de les funcions de text.
Per a accedir a aquesta ordre...
Insereix ▸ Funció ▸ categoria Text
Using double quotation marks in formulas
To include a text string in a formula, place the text string between two double quotation marks (") and Calc takes the characters in the string without attempting to interpret them. For example, the formula ="Hello world!" displays the text string Hello world! in the cell, with no surrounding double quotation marks.
The more complex formula =CONCATENATE("Life is really simple, "; "but we insist on making it complicated "; "(Confucius).") concatenates three individual strings in double quotation marks, outputting Life is really simple, but we insist on making it complicated (Confucius).
To place a literal double quotation mark within a string inside a formula, two methods can be used:
You can "escape" the double quotation mark with an additional double quotation mark, and Calc treats the escaped double quotation mark as a literal value. For example, the formula ="My name is ""John Doe""." outputs the string My name is "John Doe". Another simple example is the formula =UNICODE("""") which returns 34, the decimal value of the Unicode quotation mark character (U+0022) — here the first and fourth double quotation marks indicate the beginning and end of the string, while the second double quotation mark escapes the third.
You can use the CHAR function or the UNICHAR function to insert a double quotation mark. For example, the formula =UNICHAR(34) & "The Catcher in the Rye" & UNICHAR(34) & " is a famous book by J. D. Salinger." displays the string "The Catcher in the Rye" is a famous book by J. D. Salinger.
Be aware that Calc's AutoCorrect function may modify double quotation marks. AutoCorrect should not change the double quotation marks within formula cells but may change those used in non-formula cells containing text. For example, if you copy a string that is surrounded by some other form of typographical double quotation marks, such as the left double quotation mark (U+201C) and the right double quotation mark (U+201D), and then paste into a formula cell, an error may result. Open the Double Quotes area of the Tools - AutoCorrect Options - Localized Options dialog to set the characters used to automatically correct the start and end typographical double quotation marks. Uncheck the Replace toggle button to disable the feature.
Empty string and blank cells
Cells with the empty string ("") are not equivalent to blank cells. When searching or calculating with text, the empty string "" is the text with length zero.
For example, when the formula in A1 returns the empty string "", the following applies:
=ISBLANK(A1) returns FALSE. The cell is not blank.
=ISFORMULA(A1) returns TRUE. The cell is a formula.
=ISLOGICAL(A1) returns FALSE. Not a logical value.
=ISNONTEXT(A1) returns FALSE. The cell has the empty string.
=ISNUMBER(A1) returns FALSE. Not a number.
=ISTEXT(A1) returns TRUE. The cell has the empty string, calculated by a formula.
=LEN(A1) returns 0. The length of the empty string is 0.
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.
Retorna la posició d'una cadena de text en una altra cadena. També podeu definir on voleu començar la cerca. El terme de cerca pot ser un nombre o qualsevol cadena de caràcters. En la cerca es distingeix entre majúscules i minúscules.
Reemplaça una part d'una cadena de text per una altra cadena de text. Aquesta funció es pot utilitzar per reemplaçar caràcters i nombres (que es converteixen en text automàticament). El resultat de la funció sempre es mostra en forma de text. Si voleu fer més càlculs amb un nombre que s'ha reemplaçat per text, l'haureu de tornar a convertir en un nombre mitjançant la funció VALOR.
Converteix un nombre en xifres romanes. L'interval de valors ha de ser entre 0 i 3999. És possible especificar un mode de simplificació en un interval de 0 a 4.
Retorna la posició d'un segment de text en una cadena de caràcters. Podeu definir l'inici de la cerca com una opció. El text de cerca pot ser un nombre o qualsevol seqüència de caràcters. En la cerca no es distingeix entre majúscules i minúscules. Si el text no es troba, es retorna l'error 519 (#VALOR).
Converts the string representation of a number to numeric form. If the supplied string is a valid date, time, or date-time, the corresponding date-time serial number is returned.