TEXTBEFORE Function
The TEXTBEFORE function is one of the text and data functions. It is used to return text occurring before delimiting characters.
The TEXTBEFORE function syntax is:
TEXTBEFORE(text,delimiter,[instance_num], [match_mode], [match_end], [if_not_found])
where
text is the text the search is conducted within. Wildcard characters are not allowed. If text is an empty string, the function returns empty text.
delimiter is the text that marks the point before which the function extracts the text.
instance_num is 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 is 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 is 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 is an optional argument. It sets a value that is returned if no match is found.
To apply the TEXTBEFORE function,
- select the cell where you wish to display the result,
-
click the Insert function icon situated at the top toolbar,
or right-click within a selected cell and select the Insert Function option from the menu,
or click the icon situated at the formula bar,
- select the Text and data function group from the list,
- click the TEXTBEFORE function,
- enter the required arguments separating them by commas,
- press the Enter button.
The result will be displayed in the selected cell.

Return to previous page