## Excel Formula: Extract first and last name from e-mail address

This tutorial introduces the formulas to extract first name and last name from given email addresses into separate cells as below screenshot shown, also, it provides the example to explain the arguments and parts of the formulas.

### Extract first name

Generic formula:

Arguments

 E_address: the email address you want to extract the first name. Separator: the delimiter between first name and last name.

How this formula work

To extract first name from the email address in cell B3, please use below formula:

 =LEFT(B3,FIND("_",B3)-1)

Press Enter key.

Explanation

FIND function: to find the start position of a character or text in a given text string. The formula FIND("_",B3) finds the position of character “_” in the cell B3, returns 4.

LEFT function: extract text from left side of the given text string based on the given text length. Formula LEFT(B3,FIND("_",B3)-1) can be seen as LEFT(B3,4-1), extract first 3 characters from the text in cell B3.

### Extract last name

Generic formula

Argument

 E_address: the email address you want to extract the first name. Separator: the delimiter between first name and last name.

How this formula work

To extract last name from the email address in cell B3, please use below formula:

 =LEFT(RIGHT(B3,LEN(B3)-FIND("_",B3)),FIND("@",RIGHT(B3,LEN(B3)-FIND("_",B3)))-1)

Press Enter key.

Explanation

FIND function: to find the start position of a character or text in a given text string.

LEN function: count the number of a text string.

RIGHT function: to extract text from right side.

The formula RIGHT(B3,LEN(B3)-FIND("_",B3)) can be seen as:
=RIGHT(B3,LEN(B3)-4)
=RIGHT(B3,17)
=""

Then FIND("@",RIGHT(B3,LEN(B3)-FIND("_",B3))) can be seen as
=FIND("@","")
="6"

LEFT function: extract text from left side of the given text string based on the given text length. The formula LEFT(RIGHT(B3,LEN(B3)-FIND("_",B3)),FIND("@",RIGHT(B3,LEN(B3)-FIND("_",B3)))-1) can be seen as these:
=LEFT(RIGHT(B3,LEN(B3)-FIND("_",B3)),6-1)
=LEFT("",5)
="Smith"

Remark

If you want to extract first and last name with first letter uppercase, you can add the PROPER function in the front of above formulas, such as:

=PROPER(LEFT(B3,FIND("_",B3)-1))
=PROPER(LEFT(RIGHT(B3,LEN(B3)-FIND("_",B3)),FIND("@",RIGHT(B3,LEN(B3)-FIND("_",B3)))-1))

### The Best Office Productivity Tools

#### Kutools for Excel - Helps You To Stand Out From Crowd

 🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions… Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ... Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup... Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Columns to Select Same & Different Cells ... Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

#### Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

• One second to switch between dozens of open documents!
• Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
• Increases your productivity by 50% when viewing and editing multiple documents.
• Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
``````<body><table border="1" cellspacing="0" cellpadding="4">
<tbody style="font-family:sans-serif">
<tr bgcolor="#999999" style="color:#ffffff;">
<td>First Name</td>
<td>Last Name</td>
<td>Domain</td>
<td>Separator</td>
</tr>
<tr>
<td>RegularLabs.EmailProtector.unCloak("ep_b36eefa1");</td>
<td>Jane</td>
<td>Doe</td>
<td>abc.com</td>
<td>“_”</td>
</tr>
<tr bgcolor="#eeeeee">
<td>RegularLabs.EmailProtector.unCloak("ep_13f32121");</td>
<td>John</td>
<td>Smith</td>
<td>cbs.com</td>
<td>“.”</td>
</tr>
<tr>
<td>RegularLabs.EmailProtector.unCloak("ep_bcb83ca6");</td>
<td>G</td>
<td>Jones</td>
<td>nbc.com</td>
<td>none</td>
</tr>
</tbody>``````
This comment was minimized by the moderator on the site
``````<html>

<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<!--
col
{mso-width-source:auto;}

/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin-right:0in;
margin-left:0in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
color:black;}
.MsoChpDefault
{font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->
</style>

<div class=WordSection1>

<p class=MsoNormal style='margin:0in'><span style='font-family:"Times New Roman",serif;
color:windowtext'>&nbsp;&nbsp; </span></p>

<!--The following information was generated by Microsoft Excel's Publish as Web
Page wizard.--><!--If the same item is republished from Excel, all information between the DIV
tags will be replaced.--><!-----------------------------><!--START OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD --><!----------------------------->

<div align=center>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=659
style='width:494.0pt;border-collapse:collapse'>
<col width=148 span=2 style='mso-width-source:userset;mso-width-alt:4736;
width:111pt'><col width=99 style='mso-width-source:userset;mso-width-alt:3157;width:74pt'><col width=96 style='mso-width-source:userset;mso-width-alt:3072;width:72pt'><col width=77 style='mso-width-source:userset;mso-width-alt:2474;width:58pt'><col width=91 style='mso-width-source:userset;mso-width-alt:2901;width:68pt'>
<tr style='height:16.0pt'>
<td width=148 nowrap valign=bottom style='width:111.0pt;border:solid #C9C9C9 1.0pt;
height:16.0pt'>
<p class=MsoNormal style='margin:0in'><b><span style='color:white'>Subscriber
Key</span></b></p>
</td>
<td width=148 nowrap valign=bottom style='width:111.0pt;border-top:solid #C9C9C9 1.0pt;
border-left:none;border-bottom:solid #C9C9C9 1.0pt;border-right:none;
<p class=MsoNormal style='margin:0in'><b><span style='color:white'>Email
</td>
<td width=99 nowrap valign=bottom style='width:74.0pt;border-top:solid #C9C9C9 1.0pt;
border-left:none;border-bottom:solid #C9C9C9 1.0pt;border-right:none;
<p class=MsoNormal style='margin:0in'><b><span style='color:white'>First Name</span></b></p>
</td>
<td width=96 nowrap valign=bottom style='width:1.0in;border-top:solid #C9C9C9 1.0pt;
border-left:none;border-bottom:solid #C9C9C9 1.0pt;border-right:none;
<p class=MsoNormal style='margin:0in'><b><span style='color:white'>Last Name</span></b></p>
</td>
<td width=77 nowrap valign=bottom style='width:58.0pt;border-top:solid #C9C9C9 1.0pt;
border-left:none;border-bottom:solid #C9C9C9 1.0pt;border-right:none;
<p class=MsoNormal style='margin:0in'><b><span style='color:white'>Domain</span></b></p>
</td>
<td width=91 nowrap valign=bottom style='width:68.0pt;border:solid #C9C9C9 1.0pt;
16.0pt'>
<p class=MsoNormal style='margin:0in'><b><span style='color:white'>Separator</span></b></p>
</td>
</tr>
<tr style='height:16.0pt'>
<td nowrap valign=bottom style='border-top:none;border-left:solid #C9C9C9 1.0pt;
border-bottom:solid #C9C9C9 1.0pt;border-right:none;background:#EDEDED;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>RegularLabs.EmailProtector.unCloak("ep_d5e23241");</span></p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'>RegularLabs.EmailProtector.unCloak("ep_476e2289");</p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>Jane</span></p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>Doe</span></p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>abc.com</span></p>
</td>
<td nowrap valign=bottom style='border-top:none;border-left:none;border-bottom:
solid #C9C9C9 1.0pt;border-right:solid #C9C9C9 1.0pt;background:#EDEDED;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>“_”</span></p>
</td>
</tr>
<tr style='height:16.0pt'>
<td nowrap valign=bottom style='border-top:none;border-left:solid #C9C9C9 1.0pt;
border-bottom:solid #C9C9C9 1.0pt;border-right:none;padding:.75pt .75pt 0in .75pt;
height:16.0pt;box-sizing: border-box'>
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>RegularLabs.EmailProtector.unCloak("ep_6b2b88ae");</span></p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'>RegularLabs.EmailProtector.unCloak("ep_44891fd7");</p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>John</span></p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>Smith</span></p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>cbs.com</span></p>
</td>
<td nowrap valign=bottom style='border-top:none;border-left:none;border-bottom:
solid #C9C9C9 1.0pt;border-right:solid #C9C9C9 1.0pt;padding:.75pt .75pt 0in .75pt;
height:16.0pt'>
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>‘,”</span></p>
</td>
</tr>
<tr style='height:16.0pt'>
<td nowrap valign=bottom style='border-top:none;border-left:solid #C9C9C9 1.0pt;
border-bottom:solid #C9C9C9 1.0pt;border-right:none;background:#EDEDED;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>RegularLabs.EmailProtector.unCloak("ep_d6f67684");</span></p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'>RegularLabs.EmailProtector.unCloak("ep_b4b86b95");</p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>G</span></p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>Jones</span></p>
</td>
<td nowrap valign=bottom style='border:none;border-bottom:solid #C9C9C9 1.0pt;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>nbc.com</span></p>
</td>
<td nowrap valign=bottom style='border-top:none;border-left:none;border-bottom:
solid #C9C9C9 1.0pt;border-right:solid #C9C9C9 1.0pt;background:#EDEDED;
<p class=MsoNormal style='margin:0in'><span style='color:#A6A6A6'>none</span></p>
</td>
</tr>
<tr>
<td width=148 nowrap valign=bottom style='width:111.0pt;padding:.75pt .75pt 0in .75pt'></td>
<td width=148 nowrap valign=bottom style='width:111.0pt;padding:.75pt .75pt 0in .75pt'></td>
<td width=99 nowrap valign=bottom style='width:74.0pt;padding:.75pt .75pt 0in .75pt'></td>
<td width=96 nowrap valign=bottom style='width:1.0in;padding:.75pt .75pt 0in .75pt'></td>
<td width=77 nowrap valign=bottom style='width:58.0pt;padding:.75pt .75pt 0in .75pt'></td>
<td width=91 nowrap valign=bottom style='width:68.0pt;padding:.75pt .75pt 0in .75pt'></td>
</tr>
</table>

</div>

<p class=MsoNormal style='margin:0in'><span style='font-family:"Times New Roman",serif;
color:windowtext'>&nbsp;</span></p>

<!-----------------------------><!--END OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD--><!-----------------------------></div>

</body>

</html>
``````
This comment was minimized by the moderator on the site
This supports any separator by simply adding or replacing the MIN array. It also proper cases the name:

** First Name **
``````
=PROPER(
LEFT(
LEFT(
FIND(
"@",
) - 1
),
MIN(
IFERROR(
FIND(
{
".",
"_"
},
LEFT(
FIND(
"@",
) - 1
)
),
""
)
) - 1
)
)``````

** Last Name **
``````
=PROPER(
RIGHT(
LEFT(
FIND(
"@",
) - 1
),
LEN(
LEFT(
FIND(
"@",
) - 1
)
) -
MIN(
IFERROR(
FIND(
{".","_"},
LEFT(
FIND(
"@",
) - 1
)
),
""
)
)
)
)``````
This comment was minimized by the moderator on the site
I realized using the @ within the command also helped but did not isolate the first and last name where applicable.
=PROPER(LEFT(A4,FIND("@",A4)-1))

I will keep researching and hopefully be able to fine tune better