Create Email Addresses From Names in Excel
By ExcelReady TeamUpdated 7 min read
The short answer
To create an email address from a name in Excel, join the first name, a dot, the last name and the domain with &, then wrap it in LOWER: =LOWER(A2&"."&B2&"@example.com"). Add TRIM to remove stray spaces, and SUBSTITUTE to drop spaces or apostrophes inside names. Fill the formula down to build the whole list.
Key takeaways
- The basic pattern is =LOWER(A2&"."&B2&"@example.com"): first name, dot, last name, domain.
- Wrap names in TRIM so a hidden space doesn't end up inside the address.
- Use SUBSTITUTE to remove spaces and apostrophes, which are not safe in an email address.
- TEXTJOIN joins parts with a separator and can skip a blank middle name.
- Check the finished list for duplicates with COUNTIF before you import it anywhere.
On this page+
To create an email from a name in Excel, you join the first name, a dot, the last name and the company domain into one piece of text, then make it lowercase. The formula is =LOWER(A2&"."&B2&"@example.com"), and it takes a minute to set up for a list of any size. This guide is for anyone setting up new staff accounts, a mailing list or a test task in a job assessment.
The sample data#
All the examples use this small staff list. Column A holds first names and column B holds last names. Some names have the problems you will meet in real data: a trailing space after "Lopez", an apostrophe, and names with a space inside them.
| A | B | C | |
|---|---|---|---|
| 1 | First | Last | |
| 2 | Maria | Lopez␣ | |
| 3 | James | O'Neil | |
| 4 | Anna Lee | Park | |
| 5 | Tom | van Dijk |
The ␣ symbol shows the hidden space at the end of "Lopez ". You can't see it in Excel, but it will end up inside the address if you don't remove it.
How to create an email address from a first and last name#
Join the parts with the & operator, which glues pieces of text together. Text you type yourself, like the dot and the domain, goes in double quotes.
=A2&"."&B2&"@example.com"For row 3 this returns James.O'Neil@example.com. It works, but it has capital letters and an apostrophe. Most email systems ignore capitals, but a lowercase list looks tidy and avoids duplicates that differ only in case. Wrap the formula in LOWER:
=LOWER(A2&"."&B2&"@example.com")Now row 3 returns james.o'neil@example.com. To fill the whole column, select C2:C5 and press Ctrl+D on Windows or ⌘D on a Mac. You can also double-click the small square at the bottom-right of C2.
If you'd rather keep the domain in its own cell, say E1, use "@"&$E$1 instead of typing it. The $ signs lock the reference so it doesn't move when you fill down. Then you change the domain in one place and every address updates. For more ways to join text, see the guide to combining text from several cells.
How to remove spaces and apostrophes from the names#
Clean the names inside the formula, so the source data stays as it is. Three small functions do the work:
- TRIM removes spaces at the start and end of the text, and turns double spaces into single ones.
- SUBSTITUTE(text, old, new) replaces one piece of text with another. Replacing
" "with""deletes every space. - LOWER turns every letter into lowercase.
Here is the cleaned version, written over two lines so it is easier to read:
=LOWER(SUBSTITUTE(SUBSTITUTE(
TRIM(A2)&"."&TRIM(B2)," ",""),"'","")&"@example.com")The inner SUBSTITUTE removes spaces and the outer one removes apostrophes. The results are:
| Name | |
|---|---|
| Maria Lopez␣ | maria.lopez@example.com |
| James O'Neil | james.oneil@example.com |
| Anna Lee Park | annalee.park@example.com |
| Tom van Dijk | tom.vandijk@example.com |
TRIM is not strictly needed once SUBSTITUTE deletes every space, but keeping it makes the intent clear and protects you if you later swap the space for a dot. The cleaning text lesson covers TRIM, SUBSTITUTE and their friends in more detail.
How to use TEXTJOIN for a middle name#
TEXTJOIN joins a list of cells with the same separator between each one, and it can skip blank cells. The syntax is:
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)Say column B holds an optional middle name and column C the last name. Some people have a middle name and some don't. With &, a blank middle name leaves two dots in a row. TEXTJOIN with TRUE skips the blank:
=LOWER(TEXTJOIN(".",TRUE,A2:C2))&"@example.com"For "Maria", blank, "Lopez" this gives maria.lopez@example.com. For "Anna", "Lee", "Park" it gives anna.lee.park@example.com. TEXTJOIN needs Excel 2019, Excel 2021 or Microsoft 365. The TEXTJOIN function guide explains each argument.
Other email formats: initials and full names in one cell#
Companies use different patterns, and each one is a small change to the same formula.
| Format | Formula | Result for Maria Lopez |
|---|---|---|
| first.last | =LOWER(A2&"."&B2&"@example.com") | maria.lopez@example.com |
| first initial + last | =LOWER(LEFT(A2,1)&B2&"@example.com") | mlopez@example.com |
| first + last initial | =LOWER(A2&LEFT(B2,1)&"@example.com") | marial@example.com |
| last_first | =LOWER(B2&"_"&A2&"@example.com") | lopez_maria@example.com |
LEFT(text, 1) returns the first character of the text. The guide on getting initials from a name goes further, including middle initials.
If the full name sits in one cell, like "Maria Lopez" in A2, split it first. In Microsoft 365 or Excel 2024, TEXTBEFORE and TEXTAFTER do this neatly:
=LOWER(TEXTBEFORE(A2," ")&"."&TEXTAFTER(A2," ",-1))&"@example.com"TEXTBEFORE takes the text before the first space. TEXTAFTER with -1 takes the text after the last space, so a middle name is skipped. In older versions, use LEFT(A2,FIND(" ",A2)-1) for the first name.
How to check the list for duplicates#
Two people with the same name get the same address, and most systems will reject the second one. Add a check column next to the emails:
=COUNTIF($C$2:$C$100,C2)>1TRUE means the address appears more than once. Fix those by hand, for example by adding a middle initial or a number. COUNTIF is not case-sensitive, so Maria.Lopez and maria.lopez count as the same address, which is what you want here.
Going the other way, from an address back to its parts, is just as common. See how to extract the domain from an email address.
Common problems when building emails#
Most broken addresses come from the data, not the formula. Check these:
- Spaces inside the address. A space before or after a name sneaks in. Use TRIM, or SUBSTITUTE to remove every space.
- Accented letters. Names like José or Zoë keep their accents. Many email systems don't accept them, so replace them with SUBSTITUTE or fix them by hand.
- Missing @. Typing
"example.com"instead of"@example.com"givesmaria.lopezexample.com. - The formula shows instead of the result. The cell was formatted as Text before you typed. Change it to General and re-enter the formula.
- You need values, not formulas. Before you send the list to another system, copy the column and paste it as values so the addresses don't change if the names do.
Flash Fill is a no-formula option: type the first address by hand, then choose Data > Flash Fill (Ctrl+E on Windows). Excel copies the pattern, but it guesses, so check odd names like "van Dijk" carefully.
Practise it#
Joining text with & and cleaning it with TRIM are skills that show up in many job tests. Practise joining text in a live spreadsheet: you type the formula and it checks it instantly. Then try the exercise on this page, which builds Maria's address from a name with a hidden space.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Build Maria's work email in C2: trim both names, join them with a dot, add @example.com, and make it lowercase.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Email | |||
| 2 | Lopez | |||
| 3 | O'Neil | |||
| 4 | Park | |||
| 5 | van Dijk | |||
| 6 | ||||
| 7 | ||||
| 8 |
Tip: Put TRIM around A2 and B2, join them with "." in the middle, add "@example.com" at the end, and wrap it all in LOWER.
Practise this in a lesson
Frequently asked questions
How do I create an email address from first and last name in Excel?
Join the parts with the & operator and add the domain: =LOWER(A2&"."&B2&"@example.com"). Then fill the formula down the column.
How do I make the email first initial and last name?
Take the first letter with LEFT: =LOWER(LEFT(A2,1)&B2&"@example.com"). For Maria Lopez this gives mlopez@example.com.
How do I remove spaces from names before making emails?
Use TRIM for spaces at the start and end, and SUBSTITUTE(text," ","") for spaces inside a name, such as van Dijk. Wrap the whole result in LOWER.
Can Excel create email addresses automatically without a formula?
Yes. Type one or two addresses by hand next to the names, then use Flash Fill from the Data tab. Excel copies the pattern, but check the results because it guesses.
How do I turn the email text into a clickable link?
Use the HYPERLINK function: =HYPERLINK("mailto:"&C2,C2). The cell then opens a new email to that address when you click it.