ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Text
  3. How to Extract a Name From an Email Address in Excel

How to Extract a Name From an Email Address in Excel

By ExcelReady Team·Updated November 3, 2026·7 min read

The short answer

To extract a name from an email address in Excel, take the text before the @, replace the dots with spaces and fix the capitals. For priya.sharma@example.com in A2, =PROPER(SUBSTITUTE(LEFT(A2,FIND("@",A2)-1),"."," ")) returns Priya Sharma. In Microsoft 365 or Excel 2024, TEXTBEFORE(A2,"@") can replace the LEFT and FIND part.

Key takeaways

  • The name lives in the username, the part before the @: LEFT(A2,FIND("@",A2)-1) or TEXTBEFORE(A2,"@").
  • SUBSTITUTE swaps the dots (or underscores) for spaces, and PROPER capitalises each word.
  • For the first name, take the text before the first dot; for the last name, the text after the last dot.
  • Emails like jdoe@ or initials can't be split reliably by any formula, so check those rows by hand.
On this page+
  1. How names sit inside an email address
  2. Step 1: Get the username before the @
  3. Step 2: Turn the username into a full name
  4. Step 3: Extract only the first name
  5. Step 4: Extract only the last name
  6. Handle underscores, hyphens and numbers
  7. When a formula can't find the name
  8. Practise it

To extract a name from an email address in Excel, you take the part before the @ sign, turn the dots into spaces and fix the capital letters. One formula does all three steps, so priya.sharma@example.com becomes Priya Sharma. This guide shows the formula for every Excel version, how to get the first or last name on its own, and what to do with emails that don't contain a clear name.

How names sit inside an email address#

An email address has two parts: the username before the @ and the domain after it. When a company builds addresses from names, the name is in the username, usually with a separator between the parts:

EmailUsernameSeparator
priya.sharma@example.compriya.sharmadot
tom_baker@example.orgtom_bakerunderscore
lena.m.fischer@example.comlena.m.fischertwo dots (middle initial)
jdoe@example.comjdoenone

The formulas below find the @, keep what comes before it and split it at the separator. They return text, so the results update whenever an email in column A changes. If you need the part after the @ instead, see how to extract the domain from an email.

Step 1: Get the username before the @#

FIND returns the position of a character, and LEFT keeps that many characters from the start. For priya.sharma@example.com in A2:

Excel formula
=LEFT(A2,FIND("@",A2)-1)

FIND("@",A2) returns 13, because the @ is the 13th character. Minus 1 gives 12, so LEFT keeps the first 12 characters: priya.sharma. This works in every version of Excel. The guides to LEFT and FIND explain each function on its own.

In Microsoft 365 or Excel 2024, TEXTBEFORE does the same in one step:

Excel formula
=TEXTBEFORE(A2,"@")

Step 2: Turn the username into a full name#

SUBSTITUTE replaces one piece of text with another, and PROPER capitalises the first letter of each word. Put them around the username formula:

Excel formula
=PROPER(SUBSTITUTE(LEFT(A2,FIND("@",A2)-1),"."," "))

Read it from the inside out:

  1. LEFT(A2,FIND("@",A2)-1) returns priya.sharma.
  2. SUBSTITUTE(...,"."," ") replaces every dot with a space: priya sharma.
  3. PROPER(...) capitalises each word: Priya Sharma.

Fill it down (Windows: Ctrl+D; Mac: ⌘D). OMAR.HASSAN@example.com becomes Omar Hassan, because PROPER also lowers the other letters. lena.m.fischer@example.com becomes Lena M Fischer. The SUBSTITUTE function guide covers its optional fourth argument, which replaces only one occurrence.

The Microsoft 365 version is shorter:

Excel formula
=PROPER(SUBSTITUTE(TEXTBEFORE(A2,"@"),"."," "))

Step 3: Extract only the first name#

The first name is the text before the first dot of the username. Put the username in a helper column, B2, with one of the Step 1 formulas, then in C2:

Excel formula
=PROPER(LEFT(B2,FIND(".",B2&".")-1))

This returns Priya. The B2&"." part adds a dot to the end of the username before searching. If the username has no dot, as in jdoe, FIND still finds that added dot, and the formula returns the whole username instead of a #VALUE! error.

In Microsoft 365 or Excel 2024, use TEXTBEFORE with its last argument, if_not_found, set to the username:

Excel formula
=PROPER(TEXTBEFORE(B2,".",,,,B2))

Don't search for the first dot in the full email address. In jdoe@example.com the first dot is in the domain, so you'd get jdoe@example. Always cut the domain off first. The same "text before the first separator" idea is covered in how to extract the first word.

Step 4: Extract only the last name#

The last name is the text after the last dot, which matters when there is a middle initial. In Microsoft 365 or Excel 2024, a negative instance number counts from the end:

Excel formula
=PROPER(TEXTAFTER(B2,".",-1,,,B2))

For lena.m.fischer this returns Fischer. The final B2 returns the username when there is no dot.

In older versions, this classic formula gets the last part:

Excel formula
=PROPER(TRIM(RIGHT(SUBSTITUTE(B2,".",REPT(" ",100)),100)))

SUBSTITUTE replaces each dot with 100 spaces, RIGHT keeps the last 100 characters (spaces plus the last name) and TRIM removes the spaces. The result is also Fischer. To split a full name you've already built, see how to split a full name into first and last.

Handle underscores, hyphens and numbers#

Nest one SUBSTITUTE inside another to handle more than one separator. This turns both dots and underscores into spaces:

Excel formula
=PROPER(SUBSTITUTE(SUBSTITUTE(TEXTBEFORE(A2,"@"),"."," "),"_"," "))

tom_baker@example.org becomes Tom Baker. Leave hyphens alone: they are usually part of a name, and PROPER capitalises after them, so anne-marie.dubois becomes Anne-Marie Dubois.

Numbers, as in sam.lee82, stay in the result as Sam Lee82. Remove them in a separate step; the guide to extracting numbers from text shows how to work with digits mixed into text.

When a formula can't find the name#

Some addresses don't contain a clear name, and no formula can fix that:

  • Initials and joined names such as jdoe or jsmith: Excel can't tell where the first name ends.
  • Role addresses such as info@ or sales@: there is no person's name.
  • Name rules PROPER doesn't know: mcdonald becomes Mcdonald, not McDonald.

Add a check column that flags usernames with no separator, for example =IF(ISNUMBER(FIND(".",B2)),"OK","Check"), then filter it to Check and review those rows by hand. Flash Fill is useful for a small, messy list: type the first name the way you want it, then press Ctrl+E on Windows or choose Data > Flash Fill on a Mac. Flash Fill results are fixed text, so they don't update when the email changes.

Imported lists often have extra spaces or mixed capitals. Clean the email column first with =LOWER(TRIM(A2)), so FIND works on tidy text. Going the other way, from names to addresses, is covered in how to create an email address from a name.

Practise it#

Try the exercise on this page: one formula turns an email into a full name. Then practise LEFT, RIGHT, MID and LEN in a live spreadsheet, practise TEXTBEFORE and TEXTAFTER for the shorter Microsoft 365 formulas, and clean messy text with TRIM, PROPER and SUBSTITUTE. Each lesson checks your formula as soon as you press Enter.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Turn the email in A2 into a name. Click B2, take the text before the @ with LEFT and FIND, replace the dot with a space using SUBSTITUTE, and wrap it all in PROPER. Press Enter.

fx
ABCD
1
Email
Name
2
priya.sharma@example.com
3
omar.hassan@example.com
4
lena.fischer@example.org
5
tom.baker@example.com
6
7
8

Tip: Work from the inside out: FIND("@",A2)-1 is the username length, LEFT takes it, SUBSTITUTE swaps "." for " ", and PROPER fixes the capitals.

Practise this in a lesson

LessonTEXTBEFORE and TEXTAFTERSplit emails, "Last, First" names and file paths at a delimiter with TEXTBEFORE and TEXTAFTER, including picking which occurrence to split at.LessonLEFT, RIGHT, MID and LENSplit product codes and IDs into their parts by taking characters from the start, end or middle of the text.LessonCleaning messy textFix stray spaces, random capitals and inconsistent separators in imported data with TRIM, PROPER, UPPER, LOWER and SUBSTITUTE.Function guideLEFTPull the first characters from a cell with Excel's LEFT: prefixes, initials and first names. Examples, pitfalls and live practice.Function guideFINDLocate a character inside text with Excel's FIND, then use it with LEFT, MID and RIGHT. Case rules, #VALUE! fixes and a live exercise.Function guideSUBSTITUTESwap or strip characters with Excel's SUBSTITUTE: clean phone numbers, change one occurrence and count characters with LEN. Practice it live.

Frequently asked questions

How do I get the first name from an email address in Excel?

+

Take the username, then the text before its first dot. With the username in B2, =PROPER(LEFT(B2,FIND(".",B2&".")-1)) returns Priya from priya.sharma. Adding a dot to the end stops FIND failing when there is no dot.

How do I extract everything before the @ in Excel?

+

Use =LEFT(A2,FIND("@",A2)-1), which works in every version. In Microsoft 365 or Excel 2024, =TEXTBEFORE(A2,"@") does the same thing in a shorter formula.

Can Flash Fill extract names from emails?

+

Yes. Type the name for the first email in the next column, then press Ctrl+E on Windows or use Data > Flash Fill on a Mac. The results are fixed text and don't update, so check them.

Why does PROPER give Mcdonald instead of McDonald?

+

PROPER capitalises only the first letter of each word and any letter after a non-letter character. It doesn't know name rules such as Mc or van, so fix those few cells by hand.

Sources

  • LEFT, LEFTB functions - Microsoft Support
  • SUBSTITUTE function - Microsoft Support
  • TEXTBEFORE function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How names sit inside an email address
  2. Step 1: Get the username before the @
  3. Step 2: Turn the username into a full name
  4. Step 3: Extract only the first name
  5. Step 4: Extract only the last name
  6. Handle underscores, hyphens and numbers
  7. When a formula can't find the name
  8. Practise it

Keep reading

Text· 7 min read

Extract the Domain or Username From an Email in Excel

To extract the domain from an email address, take everything after the @ sign. In Microsoft 365, use =TEXTAFTER(A2,"@"). In any version, use =MID(A2,FIND("@",A2)+1,LEN(A2)). For the username, take everything before the @: =TEXTBEFORE(A2,"@") or =LEFT(A2,FIND("@",A2)-1). Wrap either in IFERROR for cells without an @.

Text· 6 min read

How to Extract the First Word in Excel

To extract the first word from A2, use =TEXTBEFORE(A2," ") in Microsoft 365 or Excel 2024. In any version, use =LEFT(A2,FIND(" ",A2)-1), which keeps everything before the first space. To stop one-word cells from causing an error, write =LEFT(A2,FIND(" ",A2&" ")-1). Wrap A2 in TRIM if the text might start with spaces.

Text· 7 min read

How to Split First and Last Names in Excel

To split a full name in Excel, use =TEXTBEFORE(A2," ") for the first name and =TEXTAFTER(A2," ",-1) for the last name, which also handles middle names. In Excel 2021 and older, use =LEFT(A2,FIND(" ",A2)-1) for the first name. For a one-off job, Data > Text to Columns or Flash Fill splits names without formulas.

More on text

  • Extract Numbers From Text in Excel
  • Extract Text Between Two Characters in Excel
  • Find the Nth Occurrence of a Character in Excel
  • Find the Position of Text in a Cell (FIND and SEARCH)
  • How to Format Phone Numbers in Excel
  • How to Create a Unique ID in Excel With a Formula
All text articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free