Tekstfuncties

In deze sectie staan beschrijvingen van de Tekst-functies.

Om toegang te krijgen tot deze functie..

Invoegen - Functie - Categorie Tekst


Dubbele aanhalingstekens gebruiken in formules

Om een tekenreeks in een formule op te nemen, plaatst u de tekenreeks tussen twee dubbele aanhalingstekens (") en Calc neemt de tekens in de tekenreeks zonder te proberen ze te interpreteren. Bijvoorbeeld de formule ="Hallo wereld!" geeft de tekstreeks Hallo wereld! weer in de cel, zonder dubbele aanhalingstekens eromheen.

De meer complexe formule =TEKST.SAMENVOEGEN("Het leven is heel eenvoudig, "; "maar we staan erop het ingewikkeld te maken"; "(Confucius).") voegt drie afzonderlijke strings aan elkaar tussen dubbele aanhalingstekens, met als resultaat Het leven is heel eenvoudig, maar we staan erop het ingewikkeld te maken (Confucius).

Om een letterlijk dubbel aanhalingsteken binnen een tekenreeks in een formule te plaatsen, kunnen twee methoden worden gebruikt:

  1. U kunt het dubbele aanhalingsteken "ontsnappen" met een extra dubbel aanhalingsteken, en Calc behandelt het dubbele aanhalingsteken met escapetekens als een letterlijke waarde. Bijvoorbeeld, de formule ="Mijn naam is ""John Doe""." geeft de tekenreeks Mijn naam is "John Doe". Een ander eenvoudig voorbeeld is de formule =UNICODE("""") wat 34 retourneert, de decimale waarde van het Unicode-aanhalingsteken (U+0022) — hier geven de eerste en vierde dubbele aanhalingstekens de begin en einde van de tekenreeks, terwijl het tweede dubbele aanhalingsteken aan de derde ontsnapt.

  2. U kunt de functies CHAR of UNITEKEN gebruiken om een dubbel aanhalingsteken in te voegen. Bijvoorbeeld, de formule =UNITEKEN(34) & "The Catcher in the Rye" & UNITEKEN(34) & " is een beroemd boek van JD Salinger." geeft de string "The Catcher" weer in the Rye" is een beroemd boek van JD Salinger.

Houd er rekening mee dat de AutoCorrectie-functie van Calc dubbele aanhalingstekens kan wijzigen. AutoCorrectie zou de dubbele aanhalingstekens in formulecellen niet moeten wijzigen, maar kan de aanhalingstekens die worden gebruikt in niet-formulecellen die tekst bevatten, wijzigen. Als u bijvoorbeeld een tekenreeks kopieert die is omgeven door een andere vorm van typografische dubbele aanhalingstekens, zoals het dubbele dubbele aanhalingsteken links (U+201C) en het rechter dubbele aanhalingsteken (U+201D), en vervolgens in een formulecel, kan er een fout optreden. Open het gebied Dubbele aanhalingstekens van het dialoogvenster Extra - AutoCorrectie-opties - Gelokaliseerde opties om de tekens in te stellen die worden gebruikt om de typografische dubbele aanhalingstekens aan het begin en einde automatisch te corrigeren. Schakel de schakelknop Vervangen uit om de functie uit te schakelen.

Lege tekenreeks en lege cellen

Cellen met de lege tekenreeks ("") zijn niet gelijk aan lege cellen. Bij het zoeken of berekenen met tekst is de lege tekenreeks "" de tekst met lengte nul.

Als de formule in A1 bijvoorbeeld de lege tekenreeks "" retourneert, geldt het volgende:

=ISLEEG(A1) retourneert ONWAAR. De cel is niet leeg.

=ISFORMULE(A1) retourneert WAAR. De cel is een formule.

=ISLOGISCH(A1) retourneert ONWAAR. Geen logische waarde.

=ISGEENTEKST(A1) retourneert ONWAAR. De cel bevat de lege tekenreeks.

=ISGETAL(A1) retourneert ONWAAR. Geen nummer.

=ISTEKST(A1) retourneert WAAR. De cel bevat de lege tekenreeks, berekend met een formule.

=LENGTE(A1) retourneert 0. De lengte van de lege tekenreeks is 0.

ARABISCH

Retourneert de numerieke waarde die overeenkomt met een Romeins cijfer uitgedrukt als tekst.

ASC

Converteert double-byte (volledige breedte) tekens naar single-byte (halve breedte) ASCII- en katakana-tekens.

BAHT.TEKST

Converteert een getal naar Thaise tekst, inclusief de namen van de Thaise valuta.

BASE

Converteert een positief geheel getal naar een opgegeven grondtal in een tekst uit het nummeringssysteem. Er worden de cijfers 0-9 en de letters A-Z gebruikt.

TEKEN

Converteert een getal naar een teken volgens de huidige codetabel. Het getal kan een geheel getal van twee of drie cijfers zijn.

WISSEN.CONTROL

Alle niet-afdrukbare tekens worden uit de tekenreeks verwijderd.

CODE

Returns a numeric code for the first character in a text string.

CONCATENATE

Combines several text strings into one string.

DECIMAL

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.

DOLLAR

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.

EXACT

Compares two text strings and returns TRUE if they are identical. This function is case-sensitive.

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.

FIXED

Returns a number as text with a specified number of decimal places and optional thousands separators.

JIS

Converteert enkelbyte (halve breedte) ASCII- of katakana-tekens naar dubbelbyte (volledige breedte) tekens.

LEFT

Returns the first character or characters of a text.

LEFTB

Returns the first characters of a DBCS text.

LEN

Returns the length of a string including spaces.

LENB

For double-byte character set (DBCS) languages, returns the number of bytes used to represent the characters in a text string.

LOWER

Converts all uppercase letters in a text string to lowercase.

MID

Returns a text string of a text. The parameters specify the starting position and the number of characters.

MIDB

Returns a text string of a DBCS text. The parameters specify the starting position and the number of characters.

PROPER

Capitalizes the first letter in all words of a text string.

REGEX

Komt overeen en extraheert of vervangt optioneel tekst met behulp van reguliere expressies.

REPLACE

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.

REPT

Repeats a character string by the given number of copies.

RIGHT

Returns the last character or characters of a text.

RIGHTB

Returns the last character or characters of a text with double bytes characters sets (DBCS).

ROMEINS

Converteert een getal naar een Romeins cijfer. Het waardebereik moet tussen 0 en 3999 liggen. Een vereenvoudigingsmodus kan worden gespecificeerd in het bereik van 0 tot 4.

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).

SUBSTITUTE

Substitutes new text for old text in a string.

T

This function returns the target text, or a blank text string if the target is not text.

TEXT

Converts a value into text according to a given format.

TRIM

Removes spaces from a string, leaving only a single space character between words.

UNICHAR

Converts a code number into a Unicode character or letter.

UNICODE

Returns the numeric code for the first Unicode character in a text string.

UPPER

Converts the string specified in the text field to uppercase.

WAARDE

Converteert de tekenreeksrepresentatie van een getal naar een numerieke vorm. Als de opgegeven tekenreeks een geldige datum, tijd of datum-tijd is, wordt het bijbehorende serienummer voor datum-tijd geretourneerd.

WEBSERVICE

Web-inhoud van een URI verkrijgen.

XMLFILTER

Pas een XPath-expressie toe op een XML-document.

URLCODERING

Geeft een URL-gecodeerde tekenreeks