Podpořte nás!

TEXTBEFORE

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

Syntaxe

TEXTBEFORE( Text [; Oddělovač [; Číslo instance [; Režim porovnávání [; Porovnávání konce [; Při nenalezení ]]]]])

Text: původní text.

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

Režim porovnávání: (nepovinné) nastavte na 1, chcete-li při porovnávání ignorovat velikost písmen. Výchozí je 0.

Match End: (optional) set to 1 to treat the end of text as as accitional delimiter. The default is 0.

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

Ikona poznámky

Jakýkoli z nepovinných argumentů lze vynechat. Nepovinný argument vyžaduje, aby byly přítomny všechny předchozí oddělovače.


Příklady

=TEXTBEFORE("Být, či nebýt";"být";2;0;0;"@@@") vrátí řetězec „Být, či ne“, odpovídající textu až po druhou instanci oddělovače „být“.

=TEXTBEFORE("Být, či nebýt";"otázka";1;0;0;"@@@") vrátí text „@@@“, protože oddělovač „otázka“ se ve zdrojovém textu nenachází.

Interactions between Delimiter, Instance number and MatchEnd:

Text

Delimiter

Instance

MatchMode

MatchEnd

IfNotFound

TEXTBEFORE

T

D

N

Mode

MatchEnd

NotFound

TEXTAFTER

to_be_or_not_to_be

to

-4

0

0

@@@

@@@

to_be_or_not_to_be

to

-3

0

0

@@@

@@@

to_be_or_not_to_be

to

-2

0

0

@@@

to_be_or_not_to_be

to

-1

0

0

@@@

to_be_or_not_

to_be_or_not_to_be

to

0

0

0

@@@

#N/A

to_be_or_not_to_be

to

1

0

0

@@@

to_be_or_not_to_be

to

2

0

0

@@@

to_be_or_not_

to_be_or_not_to_be

to

3

0

0

@@@

@@@

to_be_or_not_to_be

to

4

0

0

@@@

@@@

to_be_or_not_to_be

to

-4

0

0

@@@

@@@

to_be_or_not_to_be

to

-3

0

1

@@@

to_be_or_not_to_be

to

-2

0

1

@@@

to_be_or_not_to_be

to

-1

0

1

@@@

to_be_or_not_

to_be_or_not_to_be

to

0

0

1

@@@

#N/A

to_be_or_not_to_be

to

1

0

1

@@@

to_be_or_not_to_be

to

2

0

1

@@@

to_be_or_not_

to_be_or_not_to_be

to

3

0

1

@@@

to_be_or_not_to_be

to_be_or_not_to_be

to

4

0

1

@@@

@@@


Technické informace

Ikona tipu

Tato funkce je k dispozici od verze LibreOfficeDev 25.8.


This function is NOT part of the Open Document Format for Office Applications (OpenDocument) Version 1.4. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.TEXTBEFORE