ExcelHero

The TEXTBEFORE function

Returns the text before a separator.

In German Excel: TEXTVOR

How to write it

=TEXTBEFORE(text, delimiter, [instance_num])
text
The text to cut.
delimiter
The separator, like "@" or "-".
instance_num
Optional. Which separator; -1 is the last one.

💡 Much easier than LEFT with FIND for emails and codes.

Try it

Get Lena’s user name: everything before the @.

A
B
C
D
1
Name
Email
Plan
Username
2
Lena
Pro
3
Tom
Free
4
Ivy
Free
5
Max
Pro
6
Zoe
Free

=TEXTBEFORE(text, "@").