Excel beginner

How to Join First and Last Names in Excel?

Combining first and last names into a single cell can streamline your data management. Use this formula to achieve that effortlessly.

Formula Genius can generate a draft from a plain-English prompt. Supported formulas can be checked with sample cases; review the coverage on the result.

The formula

Prompt

"Join first name and last name from two columns into one cell with a space between them"

Excel
=A1 & " " & B1

This formula combines the contents of two cells with a space in between.

Step-by-step breakdown

  1. Identify the cell containing the first name (e.g., A1).
  2. Identify the cell containing the last name (e.g., B1).
  3. Use the ampersand (&) to concatenate the first name and last name.
  4. Insert a space between the two names using quotes with a space (" ").

Edge cases & warnings

  • One of the name cells is empty, resulting in an extra space.
  • Both name cells are empty, leading to a blank result.
  • Names contain leading or trailing spaces that affect formatting.
  • Names include special characters that may not display correctly.

Examples

Prompt

"John, Doe"

Excel
John Doe
Prompt

"Jane, Smith"

Excel
Jane Smith

Frequently asked questions

Can I use this formula with more than two names?

Yes, you can extend the formula by adding more concatenation with additional ampersands.

What if I want a different separator?

You can replace the space in quotes with any character, like a comma or hyphen.

How do I handle empty cells?

The formula will still work, but you may want to use the IF function to manage empty cells better.

Can't find what you need?

Describe a formula in plain English. Formula Genius drafts and explains it, and can check supported formulas on sample cases.