Returns text that occurs before a given delimiter.
Syntax
TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])Arguments
textrequired
The text string you want to search within.
delimiterrequired
The character or sequence of characters that marks the point where the extraction should stop.
instance_numoptional
The occurrence of the delimiter after which to extract text; defaults to 1.
The TEXTBEFORE function extracts the portion of a string that appears before a specified delimiter. It is particularly useful for parsing data like email addresses or full names where you need to isolate the prefix or first part of the string.
Extracts the text before the first period.
Select the cell
Click the cell where you want the result to appear.
Enter the formula
Type =TEXTBEFORE( followed by the target text and the delimiter in quotes.
The function will return a #N/A error unless the if_not_found argument is provided.