Please enable JavaScript to view the comments powered by Disqus.


=LEFT(...A1,IFERROR(...SEARCH(..."_",SUBSTITUTE(...A1," ","_"))-1,LEN(...A1)))

Get anything to the left of first space or underscore

This formula get anything to left of the first space or underscore.


Used Functions

Category: Text

Returns the leftmost characters from a text value

Syntax

LEFT(text, [num_chars])

Category: Logical

Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula

Syntax

IFERROR(value, value_if_error)

Category: Text

Substitutes new text for old text in a text string

Syntax

SUBSTITUTE(text, old_text, new_text, [instance_num])

Category: Text

Returns the number of characters in a text string

Syntax

LEN(text)

Lets chat on this