TEXTVOR

Returns the text that occurs before the start of given instance of a delimiter substring.

Syntax

TEXTVOR( Text [; Trennzeichen [; Nummer des Vorkommens [; Übereinstimmungsmodus [; Textende [; Nicht gefunden ]]]]])

Text: Der Originaltext.

Delimiter: (optional) the delimiter. Multiple delimiters can be supplied. If omitted or supplied as an empty string, then returns the error #N/A or the value expressed by If Not Found.

Instance Number: (optional) the instance of the delimiter before which to extract text. The default is 1. A negative number starts searching from the end. Value 0 returns the error #N/A

Übereinstimmungsmodus: (optional) Wert auf 1 setzen, um eine Übereinstimmung ohne Berücksichtigung der Groß- und Kleinschreibung durchzuführen. Der Standardwert ist 0.

Textende: (optional) Auf 1 setzen, um das Textende als Trennzeichen zu behandeln. Der Standardwert ist 0.

If Not Found: (optional) the value returned if no match is found. The default is #N/A.

Notizsymbol

Alle optionalen Argumente können weggelassen werden. Ein optionales Argument erfordert, dass alle vorangehenden Trennzeichen vorhanden sind.


Beispiele

=TEXTBEFORE("To be or not to be";" be";2;0;0;"@@@") returns the string "To be or not to", taking up to the second instance of the delimiter " be".

=TEXTVOR("Sein oder Nichtsein";"Frage";1;0;0;"@@@") gibt den Text "@@@" zurück, weil das Trennzeichen "Frage" nicht im Quelltext vorkommt.

=TEXTBEFORE("To be or not to be";"question";1;0;1;"@@@") returns the text "To be or not to be" because the delimiter "question" is not in the source text and Match End is 1, which then returns everything before the end of text.

=TEXTBEFORE("To be or not to be";"question";-1;0;1;"@@@") returns the empty string "" because the delimiter "question" is not in the source text, Instance Number is negative (starts from the end) and Match End is 1, which prevents the function to return the error #N/A or the value defined in If Not Found.

Technische Information

Tippsymbol

This function is available since LibreOfficeDev 25.8.


Diese Funktion ist NICHT Bestandteil des Standards Open Document-Format für Office-Anwendungen (OpenDocument) Version 1.3. Teil 4: Format für neu berechnete Formeln (OpenFormula). Der Namensraum ist

COM.MICROSOFT.TEXTBEFORE

Bitte unterstützen Sie uns!

Bitte unterstützen Sie uns!