How to / Text
How to combine first and last name in Excel
Use =A2&" "&B2. The & joins text, and " " puts a space between the two names.
First name, a space, last name
| A | B | C | D | |
|---|---|---|---|---|
| 1 | First | Last | ||
| 2 | Ana | Silva | Ana Silva | |
| 3 | Ben | O'Neil |
In D2: =A2&" "&B2 → Ana Silva
How it works
- The ampersand (&) joins whatever is on its two sides into one piece of text.
- Nothing is added between them, so the space has to be a piece of its own, in quotes.
- The original cells stay as they are; the joined name is a new value.
Variations
Last name first, with a comma
A B C D 1 First Last 2 Ana Silva Silva, Ana 3 Ben O'Neil In D2:
=B2&", "&A2→ Silva, AnaWith TEXTJOIN, for a whole range
A B C D 1 First Last 2 Ana Silva Ana Silva 3 Ben O'Neil In D2:
=TEXTJOIN(" ", TRUE, A2:B2)→ Ana SilvaTEXTJOIN puts the separator between every cell of the range, and with TRUE it skips empty ones, so a missing name leaves no stray space.
An initial and the last name
A B C D 1 First Last 2 Ana Silva A. Silva 3 Ben O'Neil In D2:
=LEFT(A2, 1)&". "&B2→ A. SilvaAn email address
A B C D 1 First Last 2 Ana Silva ana.silva@example.com 3 Ben O'Neil In D2:
=LOWER(A2&"."&B2)&"@example.com"→ ana.silva@example.com
Watch out for
- The result is a formula. Delete the first-name column and the joined names break. To keep them on their own, copy the column and use Paste Special > Values.
- Without typing a formula. Type the first full name by hand, then press Ctrl+E on the cell below. Flash Fill works out the pattern and fills the rest, as plain values.
Doesn't work on your data? Paste your formula into the formula checker with a few rows of your sheet. It points at the part that fails and says why.
Functions used
- CONCAT: Joins text from several values or ranges.
- TEXTJOIN: Joins text with a separator between each item.
- CONCATENATE: Joins several text values (older version of CONCAT).
- LEFT: The first characters of a text value.
- LOWER: Converts text to lowercase.