How to Extract Text before @ Sign from an Email Address in Excel?
Last Updated :
21 Aug, 2021
You got a dataset and you want to extract the name part of the email address. This task can be done with a text to column and formula that uses the LEFT and FIND functions.
Using LEFT and FIND functions
The LEFT function:
The LEFT function returns a given text from the left of our text string based on the number of characters specified.
Syntax:
LEFT(text, [num_chars])
Parameters:
- Text: The text we want to extract from.
- Num_chars (Optional): The number of characters you want to extract. Default num_chars is 1 and the number must be a positive number that is greater than zero.
Example:
Step 1: Format your data.
Now if you want to get the first geeks from geeksforgeeks in B2. Let us follow the next step.
Step 2: We will enter =LEFT(B2,5) in the B3 cell. Here we want Excel to extract the first 5 characters from the left side of our text in B2.
This will return Geeks.
Let us move to the FIND function.
The FIND function:
The FIND function returns the position of a given text within a text.
Syntax:
FIND(find_text, within_text, [start_num])
Parameters:
- Find_text: The text we want to find.
- Within_text: The text containing our find_text.
- Start_num (Optional): The starting position of our find_text. Default is 1.
Example:
Step 1: Format your data.
Now if you want to find “for” in geeksforgeeks in B2. Let us follow the next step.
Step 2: We will enter =FIND("for",B2) in B3 cell. Here we want Excel to find “for” in our text in B2.
This will return 6 because “for” is located at character number 6 in our text.
Now let’s use both to extract text before the "@" in an email address.
Step 1: Format our data.
Step 2: Let's find the location of the "@" from the email. Here we use the FIND function.
We will enter =FIND("@",C2) in C3 cell. Here we want Excel to find “@” in our text in C2.
Step 3: This will return 9. Next, because we want the text and not the number, we would use the LEFT function while utilizing the location function of the FIND function.
Step 4: We will enter =LEFT(C2,FIND("@",C2)) in the C3 cell. Here we want Excel to extract the number of characters defined by our FIND function from the left side of our text in C2.
Step 5: But this returns a "feedback@".
Step 6: Now we need to modify the formula. Thus we add a -1 so we get the text exactly right before the "@".
Step 7: This returns what we want "feedback". Now we can drag the formula down.


Using Text to columns
This would extract it using the delimiter aspect of the text to column features of excel:
Step 1: We format our data.
Step 2: Select column C, which contains the email address.
Step 3: Move to the Data ribbon and click on Text to Columns.
Step 4: The Text to column box pops up. Though, the default is often Delimited, select Delimited if it is not. Click on Next.
Step 5: Untick the tab, tick the other check box and write down "@". Click on Next.
Step 6: Specify your location. We would change the $C$2 to $D$2 because we want the result in cell D2. Click on Finish.
Step 7: We delete the content in the E column.
Step 8: Viola! We have our text before the "@"
Similar Reads
How to Extract Text Only from Alphanumeric String in Excel? In the vast landscape of Excel spreadsheets, managing data efficiently is crucial for streamlined analysis and reporting. Often, one encounters the challenge of dealing with cells containing a mix of letters and numbers, commonly known as alphanumeric strings. Extracting only the text component from
4 min read
How to Extract the Last Word From a Cell in Excel Explore how to extract the last word from a cell in Excel. Whether youâre working with text data, names, or any other content, knowing this technique can be incredibly useful. In this article, we explain how to extract the last word from a text in a cell using the Excel function. Â Extracting words f
3 min read
How to Extract Characters from a String in R Strings are one of R's most commonly used data types, and manipulating them is essential in many data analysis and cleaning tasks. Extracting specific characters or substrings from a string is a crucial operation. In this article, weâll explore different methods to extract characters from a string i
4 min read
How to Extract Unique Items From a List in Excel Microsoft Excel is a powerful tool widely used for data manipulation and analysis. Extracting unique items from a list is a common task in Excel that involves identifying and removing duplicates, leading to cleaner and more accurate data. We often need to report Unique customers/products/items from
6 min read
How to Extract the last N Words from Text String in Excel Excel is a tool for storing and managing a large amount of data. Data is entered in a rectangular block, which we called a cell. This tool can be used to perform different tasks like creating graphs and analyzing trends, to get insights from the data. It is primarily used for financial data analysis
3 min read
Extract Emails From a Text File Using Grep Command in Linux When dealing with large text files containing various information, it's often necessary to extract specific data such as email addresses. While manual extraction is possible, it can be time-consuming and error-prone. This is where the powerful grep command in Linux comes to our rescue. In this artic
4 min read