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

ABCD
1FirstLast
2AnaSilvaAna Silva
3BenO'Neil

In D2: =A2&" "&B2 → Ana Silva

How it works

  1. The ampersand (&) joins whatever is on its two sides into one piece of text.
  2. Nothing is added between them, so the space has to be a piece of its own, in quotes.
  3. The original cells stay as they are; the joined name is a new value.

Variations

  1. Last name first, with a comma

    ABCD
    1FirstLast
    2AnaSilvaSilva, Ana
    3BenO'Neil

    In D2: =B2&", "&A2 → Silva, Ana

  2. With TEXTJOIN, for a whole range

    ABCD
    1FirstLast
    2AnaSilvaAna Silva
    3BenO'Neil

    In D2: =TEXTJOIN(" ", TRUE, A2:B2) → Ana Silva

    TEXTJOIN puts the separator between every cell of the range, and with TRUE it skips empty ones, so a missing name leaves no stray space.

  3. An initial and the last name

    ABCD
    1FirstLast
    2AnaSilvaA. Silva
    3BenO'Neil

    In D2: =LEFT(A2, 1)&". "&B2 → A. Silva

  4. An email address

    ABCD
    1FirstLast
    2AnaSilvaana.silva@example.com
    3BenO'Neil

    In D2: =LOWER(A2&"."&B2)&"@example.com" → ana.silva@example.com

Watch out for

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

Practise it

Related