The Name

Name meanings, origins and baby name ideas

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

How to Combine First and Last Name in Excel

· 5 min read · Surnames

Combining first and last names is a common task when working with spreadsheets, whether you're preparing a mailing list, creating email addresses, or cleaning up data. This guide shows you several reliable methods to merge names in Excel, Google Sheets, and other spreadsheet tools. No prior formula knowledge is needed—just follow the steps for your preferred method.

What You'll Need

  • A spreadsheet program (Microsoft Excel, Google Sheets, LibreOffice Calc, or similar)
  • A column containing first names
  • A column containing last names
  • An empty column where the combined name will appear

Step-by-Step

Method 1: Using the Ampersand (&) Operator

  1. Open your spreadsheet and locate the columns with the first and last names. For example, first names in column A, last names in column B.
  2. Click on the cell where you want the full name to appear (e.g., C2).
  3. Type an equals sign (=) to start the formula.
  4. Click the cell containing the first name (A2), then type an ampersand (&).
  5. Type a space inside double quotes: " ". This adds a space between the names.
  6. Type another ampersand (&), then click the cell containing the last name (B2).
  7. Press Enter. The combined name appears, e.g., "John Smith".
  8. To apply to the entire column, click the bottom-right corner of the cell (the fill handle) and drag down, or double-click it to auto-fill.

Method 2: Using the CONCATENATE Function

  1. Click the cell where you want the full name (e.g., C2).
  2. Type: =CONCATENATE(A2, " ", B2)
  3. Press Enter. The result is the same as the ampersand method.
  4. Drag the fill handle down to copy the formula to other rows.

Method 3: Using TEXTJOIN (Excel 2019 and newer, or Google Sheets)

  1. Click the cell where you want the full name.
  2. Type: =TEXTJOIN(" ", TRUE, A2, B2)
  3. Press Enter. The first argument is the delimiter (a space), the second (TRUE) ignores empty cells, and then you list the cells to join.
  4. Fill down as needed.

Method 4: Using Flash Fill (Excel only)

  1. In the column next to your data, type the first full name manually (e.g., in C2, type "John Smith" if A2 is John and B2 is Smith).
  2. Press Enter.
  3. Start typing the next full name in C3. Excel will detect a pattern and show a preview of the rest of the column in grey.
  4. Press Enter to accept the Flash Fill suggestion. If it doesn't appear automatically, go to the Data tab and click Flash Fill (or press Ctrl+E).

Method 5: Using Power Query (Excel for advanced users)

  1. Select your data range and go to Data > From Table/Range (ensure your data is in a table).
  2. In Power Query Editor, select the First Name column, then hold Ctrl and select the Last Name column.
  3. Go to Add Column > Merge Columns.
  4. Choose a separator (e.g., Space) and give the new column a name like "Full Name".
  5. Click OK, then Home > Close & Load to put the result back into your worksheet.

Common Mistakes

  • Forgetting the space: If you use =A2&B2, you get "JohnSmith". Always include the space in quotes.
  • Using the wrong cell references: Make sure the row number matches the row you're in. Copying a formula down adjusts references automatically, but if you type a wrong row, it will pull wrong data.
  • Leaving extra spaces in the original data: If a first name cell has a trailing space, the result will have double spaces. Use the TRIM function to clean data first.
  • Overwriting original data: Always put the combined name in a new column, so you don't lose the original first and last names.

Tips

  • If you need a comma-separated format (Last, First), use =B2 & ", " & A2.
  • To handle middle initials or suffixes, adjust the formula: =A2 & " " & B2 & " " & C2.
  • Use the TRIM function to remove any accidental spaces: =TRIM(A2 & " " & B2).
  • If you want to convert the formula results to static text (so they don't change if the original cells change), copy the column, then right-click and paste as values.
  • In Google Sheets, you can also use the JOIN function: =JOIN(" ", A2:B2).

Troubleshooting

  • Formula shows as text (e.g., "=A2&B2"): Check that the cell is not formatted as Text. Change the cell format to General, then re-enter the formula.
  • Result shows 0 or #VALUE!: This usually means one of the cells contains a number, not text. Convert the numbers to text, or use the TEXT function: =TEXT(A2,"0") & " " & TEXT(B2,"0").
  • Flash Fill doesn't work: Ensure the column you're typing in is directly adjacent to the data. If not, insert a blank column first. Also, make sure the data has a clear pattern.
  • Names appear without a space: Double-check your formula for the space inside quotes. It's easy to miss.
  • Extra spaces in the result: Use =TRIM(A2 & " " & B2) to clean up.

Frequently Asked Questions

Can I combine names from different worksheets?

Yes, reference cells from other sheets by including the sheet name and an exclamation mark, e.g., =Sheet1!A2 & " " & Sheet2!B2.

How do I combine names with a middle name?

Add another ampersand and the middle name cell, e.g., =A2 & " " & B2 & " " & C2, where C2 contains the middle name.

Can I combine names without a space (e.g., for usernames)?

Yes, just omit the space in the formula: =A2 & B2 gives you "JohnSmith". For lowercase, use the LOWER function: =LOWER(A2 & B2).

Will the combined name update if I change the first or last name?

Yes, if you use a formula, it will automatically update when the source cells change. If you used Flash Fill or paste-as-values, it will not update.

How do I combine names in a pivot table?

You need to create a new column in your source data with the combined name, then refresh the pivot table to include that field.

Can I combine names in a CSV file without Excel?

Yes, you can use a text editor with find-and-replace, but it's risky. Better to use a spreadsheet program or a script (e.g., Python) to do it safely.