Excel and formulas

Excel formula to keep text before a character

Keep only the text before a symbol.

Italian Excel formula

=SE.ERRORE(SINISTRA(A2;TROVA("_";A2)-1);A2)

English Excel formula

=IFERROR(LEFT(A2,FIND("_",A2)-1),A2)
Example

amitraz_123 becomes amitraz.

Common error

If #NAME? appears, check function language and separators.

How it works

The formula finds the character and takes the text on the left.

IFERROR returns the original text if the character is missing.

Frequently asked questions

Can I use another character?

Yes, replace _.

What if the character is missing?

It returns the original text.

Related tools