Returns text from a cell that occurs before a given delimiter
The TEXTBEFORE function is one of Excel's text functions.
TEXTBEFORE returns the text from a text string that occurs before a given delimiter (character or string).
Let's take a look at a simple example of the TEXTBEFORE function.
We would like to return the text that comes before the first space.
Return the text that comes before the first space.
text – The text that you want to extract text from
delimiter – The character that you want to extract text before
[instance_num] – The instance of the delimiter you want to extract before. Defaul is 1. Use a negative number to start from the end.
[match_mode]– Case sensitive delimiter. TRUE = yes (default) , FALSE = no
[match_end]– Treat the end of the text string as the delimiter.
[if_not_found] – What to return if the delimter provided is not found. By default, #N/A is returned
Read more about the TEXTBEFORE function on the Microsoft support page here.