Merge first and last names in Excel using the ampersand operator (=A2&" "&B2) or CONCAT (=CONCAT(A2," ",B2)). For blank cells or multiple name fields, use TEXTJOIN with ignore_empty set to TRUE for clean, space-free results.
If you’ve ever struggled with first and last names split across separate Excel columns, you know how frustrating it can be to merge them cleanly. Blank cells, extra spaces, and inconsistent formats often break formulas, leaving you with messy or incomplete results. By the end of this guide, you’ll be able to choose the right method for your data—whether it’s two columns or more—and produce a flawless full-name column ready for mail merges, reports, or database imports.
The simplest way to merge first and last names in Excel is to use the ampersand operator (&) with a space delimiter, such as =A2&" "&B2, or the CONCAT function, like =CONCAT(A2, " ", B2). For more complex cases, such as handling blank cells or combining multiple name fields, the TEXTJOIN function with its ignore-empty argument set to TRUE ensures clean results without extra spaces.
Merge names in Excel with the right method
Combining names from separate columns into a single full-name field is a common task for contact lists, employee databases, or mail merges. The key is to use the right tool for the job: formulas like CONCAT, TEXTJOIN, or the ampersand (&) operator for dynamic results, or Flash Fill for pattern-based merging without formulas. Importantly, the Merge Cells or Merge & Center tool in Excel does not combine text—it deletes all but the top-left cell’s content, making it unsuitable for merging names.
The ampersand operator is the most straightforward way to join two cells. For example, =A2&" "&B2 combines the first name in cell A2 and the last name in cell B2 with a space in between. This method is quick and works in all Excel versions, but it does not handle blank cells gracefully. If either A2 or B2 is empty, the result may include stray spaces or look incomplete.
The CONCAT function, introduced in Excel 2016, replaces the older CONCATENATE function, though CONCATENATE remains usable for backward compatibility. Both functions join text from multiple cells, but neither automatically skips blank cells. For example, =CONCAT(A2, " ", B2) produces the same result as the ampersand operator but is slightly more readable for complex joins.
Combine names using Excel formulas
Excel formulas provide the most control over how names are merged. Whether you’re working with two columns or more, formulas allow you to specify delimiters, handle blanks, and ensure consistent formatting.
CONCATENATE and CONCAT differences
The CONCATENATE function has been a staple for combining text in Excel for years. However, in Excel 2016, Excel Mobile, and Excel for the web, Microsoft introduced the CONCAT function as its successor. While CONCATENATE is still available for backward compatibility, CONCAT is the recommended choice for new work. Both functions work similarly: =CONCATENATE(A2, " ", B2) and =CONCAT(A2, " ", B2) produce identical results, joining the contents of A2 and B2 with a space in between.
The primary difference lies in their handling of ranges. CONCAT can accept cell ranges (e.g., =CONCAT(A2:C2)), while CONCATENATE requires individual cell references. However, neither function skips blank cells, which can lead to double spaces or incomplete names if a middle name column is empty.
Join first and last name with comma formatting
For mailing lists or formal documents, you may need to combine names with a comma instead of a space. The ampersand operator and CONCAT function both support custom delimiters. For example, =A2&", "&B2 or =CONCAT(A2, ", ", B2) will produce a full name like Doe, John. This approach is useful for creating email-style name formats or sorting names alphabetically by last name.
Choose the best Excel name merging method
Selecting the right method depends on your data’s structure and the presence of blank cells. For simple two-column joins with no blanks, the ampersand operator or CONCAT function is sufficient. However, if your data includes blank cells or more than two name fields, TEXTJOIN is the most reliable choice.
Comparison of Excel Name Merging Methods
| Method | Best use case | Handles blanks | Formula needed |
|---|---|---|---|
| Ampersand (&) | Simple two-column joins with no blanks | No | =A2&" "&B2 |
| CONCAT/CONCATENATE | Quick one-off combinations for two fields | No | =CONCAT(A2, " ", B2) |
| TEXTJOIN | Combining multiple fields or handling blanks | Yes | =TEXTJOIN(" ", TRUE, A2, B2, C2) |
| Flash Fill | Simple and consistent patterns (e.g., ‘First Last’) | No | N/A |
From an editorial review of Excel name merging, the recurring failure mode is choosing a method that doesn’t account for blank cells. For example, using the ampersand operator or CONCAT for data with missing middle names often results in double spaces or incomplete names. The decision rule is clear: if any name field in your range may be blank, use TEXTJOIN with its ignore_empty argument set to TRUE.
Decision Rules for Merging Names in Excel
| If | Then |
|---|---|
| Any name field in the range may be blank (e.g., missing middle names) | Use TEXTJOIN with its ignore-empty argument set to TRUE. |
| The pattern is simple and consistent across the whole column (e.g., always ‘First Last’) | Use Flash Fill. |
| Combining two fields with no blanks | Use CONCAT or CONCATENATE for quick one-off combinations. |
| Combining more than two fields or any field might be blank | Use TEXTJOIN for delimiter and blank-skip control. |
Handle blank cells and multiple name fields
Real-world data is rarely perfect. Contact lists often include missing middle names, blank last name fields, or extra spaces. Handling these edge cases is critical to producing a clean combined-name column.
TEXTJOIN blank handling for clean names
The TEXTJOIN function is the only built-in Excel method that can skip blank cells automatically. Its syntax is =TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...). To combine first, middle, and last names while ignoring empty cells, use:
=TEXTJOIN(" ", TRUE, A2, B2, C2)
Here, " " is the delimiter (a space), TRUE tells Excel to ignore empty cells, and A2, B2, and C2 are the cell references for first, middle, and last names. For example, if A2 contains John, B2 is blank, and C2 contains Doe, the result will be John Doe—no double space.
In practical Excel work, the easy-to-miss step is setting the ignore_empty argument to TRUE. Without it, TEXTJOIN behaves like CONCAT, including blank cells in the result, which can lead to extra spaces.
Create formulas without stray spaces
Double spaces or trailing spaces often appear when using the ampersand operator or CONCAT with blank cells. For example, =A2&" "&B2&" "&C2 will produce John Doe if B2 (middle name) is empty. To avoid this, use TEXTJOIN with ignore_empty set to TRUE, as shown above.
If you must use the ampersand operator, you can nest IF statements to check for blanks:
=A2&IF(B2<>"", " "&B2, "")&IF(C2<>"", " "&C2, "")
This formula adds a space and the middle name only if B2 is not empty, and does the same for the last name in C2. While this works, it becomes cumbersome with more than three fields. TEXTJOIN is the cleaner solution for most cases.
Worked Example: Merging First, Middle, and Last Names
Situation: A first/middle/last name combination where the middle name cell is sometimes empty.
Steps:
- Enter the formula
=TEXTJOIN(" ", TRUE, A2, B2, C2)in a new column. - Drag the formula down to apply it to all rows.
- Observe that rows with blank middle names do not produce extra spaces.
Result: A combined-name column without extra spaces for blank middle names.
Note: Using =A2&" "&B2&" "&C2 would produce stray spaces for blank middle names.
Fix common Excel name merging problems
Even with the right method, issues can arise. Here’s how to diagnose and fix the most common problems.
Merge Cells and Merge & Center data loss: The Merge Cells or Merge & Center tool in Excel is not designed for combining text. It deletes all but the top-left cell’s content, which can lead to data loss. For merging names, always use formulas, TEXTJOIN, or Flash Fill instead.
Extra spaces and inconsistent capitalization: Extra spaces often appear when blank cells are included in the merge. Use TEXTJOIN with ignore_empty set to TRUE to avoid this. For inconsistent capitalization (e.g., john SMITH), use the PROPER function to standardize names before merging: =PROPER(A2)&" "&PROPER(B2).
Incorrect results from inconsistent name formats: If your data includes titles (e.g., Mr., Dr.) or suffixes (e.g., Jr., Sr.), ensure these are in separate columns or handled explicitly in your formula. For example, =TEXTJOIN(" ", TRUE, A2, B2, C2, D2) can combine title, first, last, and suffix columns while skipping blanks.
Blank first or last name troubleshooting: If a first or last name cell is entirely blank, the result may start or end with a space. To fix this, use TRIM to remove leading and trailing spaces: =TRIM(TEXTJOIN(" ", TRUE, A2, B2, C2)). This ensures no stray spaces remain, even if the first or last name is missing.
Use Flash Fill and prepare final name values
Flash Fill is a powerful feature for merging names without writing formulas. It recognizes patterns in your data and automatically fills in the rest. For example, if you type John Doe in the first cell of a new column and start typing Jane in the next cell, Flash Fill will suggest Jane Smith based on the pattern it detects in the adjacent columns.
Steps to use Flash Fill:
- Type the combined name for the first row in a new column (e.g.,
John DoeinD2). - Start typing the combined name for the second row (e.g.,
JaneinD3). - Press
Ctrl + E(Windows) orCmd + E(Mac) to trigger Flash Fill. Excel will auto-fill the rest of the column based on the pattern. - Review the results carefully. Flash Fill is pattern-based and may misread inconsistent data. For example, if a middle name is missing in one row but present in another, Flash Fill might not handle it correctly.
A common failure mode with Flash Fill is assuming it will always work perfectly. In practice, it depends on data consistency. Always verify the results, especially if your data includes blank cells or irregular formats.
Converting formulas to static text: If you’ve used formulas to merge names and need to convert the results to static text (e.g., for a mail merge or database import), use Paste Special > Values. Here’s how:
- Copy the combined-name column containing formulas.
- Right-click the destination column and select Paste Special > Values.
- Verify that the new column contains static text and no longer depends on the source columns.
This step is critical if you plan to delete or reorder the original columns, as formula-linked cells will break otherwise.
Worked Example: Converting Formulas to Static Text
Situation: A combined-name column created using formulas that needs to be converted to static text for mail merge or import.
Steps:
- Copy the combined-name column containing formulas.
- Right-click the destination column and select Paste Special > Values.
- Verify that the new column contains static text and no longer depends on the source columns.
Result: A static combined-name column ready for use in mail merge or other systems.
Note: Formula-linked cells can break if the source columns are later deleted or reordered.
Clean and verify a combined-name column
Before using your combined-name column for a mail merge, database import, or report, take the time to clean and verify the results. This ensures no blank cells, double spaces, or leftover formulas remain.
Checklist for Clean Name Merging
- Review the combined-name column for double spaces or trailing spaces. Use
TRIMto clean up any stray spaces. - Check formulas for consistency before importing into another system. Ensure all cells produce the expected result.
- Convert formulas to static text using Paste Special > Values if needed. This prevents broken references if the source data changes.
A safer way to check for errors is to use the LEN function to compare the length of the combined name with the sum of the lengths of the source cells (plus delimiters). For example, if A2 is John (4 characters) and B2 is Doe (3 characters), the combined name John Doe should be 8 characters (4 + 1 space + 3). If the length is longer, it may indicate extra spaces.
Open your worksheet and run a quick audit: use =LEN(D2) to check the length of the combined name in D2 and compare it to =LEN(A2)+LEN(B2)+1 (assuming a single space delimiter). If the lengths don’t match, investigate for extra spaces or missing data.
FAQ
What formula combines first and last names in Excel?
You can use the ampersand operator with a space delimiter, like =A2&" "&B2, or the CONCAT function, like =CONCAT(A2, " ", B2). Both join the first name and last name into one cell. If you need to handle blank cells or combine more than two fields, TEXTJOIN with ignore_empty set to TRUE gives you cleaner results without stray spaces.
Can Excel combine names from different cells into one cell?
Yes, you can combine names from separate cells into a single cell using formulas like the ampersand operator, CONCAT, or TEXTJOIN. You can also use Flash Fill, which detects the pattern of a combined name and fills in the rest of the column automatically without needing any formula at all.
Is CONCATENATE still available in current Excel versions?
Yes, CONCATENATE is still available for backward compatibility, even though CONCAT was introduced in Excel 2016 as its successor and is now the recommended choice. Both functions join text from multiple cells in the same way, but CONCAT also supports referencing entire cell ranges, which CONCATENATE cannot do.
Can Flash Fill combine names without formulas?
Yes, Flash Fill can combine names without any formulas at all. Type the combined name for the first row, start typing the second one, then press Ctrl+E (Windows) or Cmd+E (Mac) to auto-fill the rest based on the pattern. Just review the results carefully, since inconsistent data can cause it to misread the pattern.
