TEXTBEFORE Function
The TEXTBEFORE function is one of the text and data functions. It is used to return text occurring before delimiting characters.
Syntax
TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])
The TEXTBEFORE function has the following argument:
Argument |
Description |
text |
The text the search is conducted within. Wildcard characters are not allowed. If text is an empty string, the function returns empty text. |
delimiter |
The text that marks the point before which the function extracts the text. |
instance_num |
An optional argument. The instance of the delimiter before which the function extracts the text. By default, instance_num equals 1. A negative number will start the text search from the end. |
match_mode |
An optional argument. It is used to determine whether the text search is case-sensitive. The default is case-sensitive. The following values are used: 0 for case sensitive, 1 for case insensitive. |
match_end |
An optional argument. It treats the end of text as a delimiter. By default, the text is an exact match. The following values are used: 0 for not matching the delimiter against the end of the text, 1 for matching the delimiter against the end of the text. |
if_not_found |
An optional argument. It sets a value that is returned if no match is found. |
Notes
How to apply the TEXTBEFORE function.
Examples
The figure below displays the result returned by the TEXTBEFORE function.
Volver a la página anterior