Articles with the tag:
Close
Changelog
Close
Articles with the tag:
Close
Try in the cloud

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,

  1. select the cell where you wish to display the result,
  2. 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,
  3. select the Text and data function group from the list,
  4. click the TEXTBEFORE function,
  5. enter the required arguments separating them by commas,
  6. press the Enter button.

The result will be displayed in the selected cell.

TEXTBEFORE Function

Return to previous page
Try now for free Try and make your decision No need to install anything
to see all the features in action