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 Columns in Excel

· 6 min read · Surnames

Combining first and last name columns into a single full name column is a common spreadsheet task that saves time when preparing mailing lists, reports, or contact sheets. This guide shows you several methods—using formulas, Flash Fill, and Power Query—so you can choose the one that fits your skill level and data size. Before you start, make sure your data is in a single sheet with the first names in one column and last names in an adjacent column, and that there are no merged cells or hidden rows that could interfere.

What You'll Need

  • A spreadsheet application: Microsoft Excel, Google Sheets, or LibreOffice Calc (steps are similar).
  • Your data organized with first and last names in separate columns (e.g., Column A = First Name, Column B = Last Name).
  • An empty column next to your data where the combined names will appear.
  • Basic familiarity with copying formulas or using fill handles.

Step-by-Step

Method 1: Using the Ampersand (&) Formula

  1. Click on the first empty cell in the column where you want the full name (e.g., C2).
  2. Type the formula: =A2 & " " & B2 (adjust cell references to match your data). The ampersand joins text, and the space in quotes adds a space between names.
  3. Press Enter. The full name appears in the cell.
  4. Click the cell again, then double-click the small square (fill handle) at the bottom-right corner of the cell to copy the formula down the entire column. Alternatively, drag the fill handle down manually.
  5. Check the results for any missing spaces or errors.

Method 2: Using the CONCATENATE Function

  1. Select the first empty cell in your target column.
  2. Type: =CONCATENATE(A2, " ", B2) and press Enter.
  3. Use the fill handle to copy the formula down for all rows.
  4. This works exactly like the ampersand method but uses a function name.

Method 3: Using TEXTJOIN (Excel 2019 and later, or Microsoft 365)

  1. In the target cell, type: =TEXTJOIN(" ", TRUE, A2:B2) — this joins the values in the range with a space, ignoring any empty cells.
  2. Press Enter and copy down as needed.
  3. This is especially useful if some rows might have missing middle names or blanks.

Method 4: Using Flash Fill (Excel and Google Sheets)

  1. In the first cell of your target column, manually type the full name exactly as you want it (e.g., "John Smith").
  2. In the next cell, start typing the next full name. Excel or Google Sheets will detect a pattern and show a preview of the remaining cells in a light gray.
  3. Press Enter to accept the Flash Fill suggestion. If the preview doesn't appear, go to the Data tab and click "Flash Fill" (Excel) or use the keyboard shortcut Ctrl+E (Windows) / Cmd+E (Mac).
  4. Verify the filled results, especially if your data has inconsistent formatting (e.g., extra spaces).

Method 5: Using Power Query (Excel for Microsoft 365, Excel 2016+)

  1. Select your data range (including headers).
  2. Go to the Data tab and click "From Table/Range" (or "From Sheet" in newer versions). If prompted, confirm that your data has headers.
  3. In the Power Query editor, select the First Name and Last Name columns (hold Ctrl to select both).
  4. Go to the "Add Column" tab and click "Merge Columns".
  5. Choose a separator (e.g., Space) and give the new column a name like "Full Name".
  6. Click "OK", then click "Close & Load" to put the results back into your worksheet.
  7. This method is best for large datasets and is non-destructive to your original columns.

Common Mistakes

  • Forgetting the space: Writing =A2&B2 results in "JohnSmith". Always include a space in the formula.
  • Using the wrong cell references: If your data starts in row 1, adjust formulas accordingly. Always check the first row of your data.
  • Copying formulas over existing data: Make sure the target column is empty; otherwise, you'll overwrite valuable information.
  • Ignoring extra spaces in original data: If a first name cell has a trailing space, the combined name may have double spaces. Use the TRIM function to clean data first.
  • Applying Flash Fill to inconsistent data: Flash Fill works best with clean, consistent patterns. If your names vary (e.g., some have middle initials), it may produce errors.

Tips

  • Use TRIM to clean data: Before combining, create a helper column with =TRIM(A2) to remove extra spaces, then combine those cleaned values.
  • Handle middle names: If you have a middle name column, include it in the formula: =A2 & " " & B2 & " " & C2.
  • Convert formulas to values: After combining, if you no longer need the original columns, copy the new column, right-click and choose "Paste Values" to replace formulas with static text. This prevents errors if you delete the original columns.
  • Use named ranges: For large datasets, consider naming your ranges (e.g., FirstName, LastName) to make formulas easier to read.
  • Test on a small sample: Always test your formula on a few rows before applying it to hundreds of rows.

Troubleshooting

Problem: The formula returns #NAME? error.
This usually means you typed the function name incorrectly (e.g., CONCATENATE misspelled). Check your spelling and ensure you use the correct function for your spreadsheet version.

Problem: The combined name has no space.
You likely omitted the space in the formula. Re-check: =A2 & " " & B2 (note the space between the quotes).

Problem: Flash Fill doesn't work or gives wrong results.
Make sure you have typed at least two examples that clearly show the pattern. If your data has inconsistencies (e.g., some names have suffixes), Flash Fill may fail. Use a formula instead.

Problem: The fill handle doesn't copy the formula down.
Double-clicking the fill handle only works if there is data in the adjacent column. If your data has blank rows, drag the handle manually instead.

Problem: The combined column shows formulas instead of values.
This happens if the cell is formatted as Text. Change the cell format to General, then re-enter the formula.

Problem: Power Query merge produces errors.
Ensure both columns are of type Text. If one column is numeric (e.g., a ZIP code), convert it to Text in the Power Query editor before merging.

Frequently Asked Questions

Can I combine first and last names without a formula?

Yes, you can use Flash Fill (Excel and Google Sheets) or the Text to Columns feature in reverse (though that's more complex). Flash Fill is the easiest non-formula method.

How do I combine names with a comma (e.g., "Smith, John")?

Change the separator in the formula to a comma and space: =B2 & ", " & A2.

What if some cells are empty?

If a first or last name is missing, the formula will still produce a result with a leading or trailing space. To avoid that, use =TRIM(A2 & " " & B2) which removes extra spaces, or use TEXTJOIN with TRUE to ignore empty cells.

Can I combine names in Google Sheets the same way?

Yes, all the formulas work identically in Google Sheets, and Flash Fill is also available (via Data > Data cleanup > Split text to columns, but for combining you can use the same ampersand formula).

Is there a way to combine multiple columns (first, middle, last) at once?

Yes, just extend the formula: =A2 & " " & B2 & " " & C2. Or use TEXTJOIN with a range: =TEXTJOIN(" ", TRUE, A2:C2).

How do I remove the original first and last name columns after combining?

First, copy the combined column and paste as values (right-click > Paste Special > Values). Then you can safely delete the original columns. This prevents the combined column from showing errors if the original data is removed.