How to Merge Names in Excel: Formulas and Flash Fill

Formulas & functions · Updated November 3, 2026

How to Merge Names in Excel: Formulas and Flash Fill

To combine first and last names in Excel, put the first names in column A and last names in column B, then enter =A2&" "&B2 in C2 and fill the formula down. This joins the two values with a space. You can also use Flash Fill or Power Query; choose based on whether you want a live formula, a quick one-time result, or a repeatable data-cleaning process.

Here, “merge names” means joining text from separate cells into one full name. It is different from Excel’s Merge & Center command, which combines cells visually and can discard the contents of all but the upper-left cell. Keep the original name columns until you have checked the results and decided whether you need to replace them.

What You’ll Need

  • A workbook in Microsoft Excel for Microsoft 365 on Windows. The instructions for formulas and Flash Fill also apply to recent desktop versions of Excel.
  • Separate columns for the name parts you want to combine, such as first name in A and last name in B, with a row of headings above the data.
  • A blank destination column for the combined names. Avoid putting results over the source columns.
  • For the formula method, ordinary formulas are enough; no add-in or special setting is required. For Power Query, use Excel’s built-in Get & Transform tools.

Step-by-Step

  1. Check and prepare your columns. Make sure each row represents one person and the name parts are in the order you want. For example, use columns headed First Name, Middle Name, and Last Name. Check that there are no extra title rows or merged cells within the data. If a name is already in one cell, you do not need to merge it with another column.
  2. Choose a blank column for the result. Add a heading such as Full Name in the first empty column beside your data. In the examples below, first names are in A2:A100, last names are in B2:B100, and the result starts in C2. Adjust the references if your data uses different columns or begins on a different row.
  3. Join first and last names with a formula. With first names in A2:A100 and last names in B2:B100, type =A2&" "&B2 in C2 and press Enter. The ampersand joins text, and the quoted space puts a single space between the two names. If A2 contains Maya and B2 contains Chen, the result in C2 is Maya Chen. If you want a comma or another separator, replace the space inside the quotation marks; for example, a comma and space would display as “Maya, Chen.”
  4. Fill the formula through all rows. Select C2, then point to the small square at the lower-right corner of the selected cell, called the fill handle. Double-click it to copy the formula down alongside adjacent data, or drag it to the last row. You can also copy C2, select the destination range, and paste. Excel adjusts the row references as it fills, so the next row uses A3 and B3. Check the bottom of the list to confirm the formula reached every record.
  5. Handle blanks or unwanted spaces. If one name part might be blank, a direct join can leave an extra space at the beginning or end. With first names in A2:A100 and last names in B2:B100, use =TRIM(A2&" "&B2) in C2 instead. If A2 is Maya and B2 is Chen, it returns Maya Chen; if B2 is blank, it returns Maya without a trailing space. TRIM removes leading and trailing spaces and reduces repeated spaces between words to one. It does not remove every kind of invisible character, so imported data may need additional cleanup.
  6. Include middle names or other parts. TEXTJOIN is convenient when some name parts may be empty. With first, middle, and last names in A2, B2, and C2 respectively, enter =TEXTJOIN(" ",TRUE,A2:C2) in D2. For Maya, a blank middle-name cell, and Chen, it returns Maya Chen; if B2 contains Lin, it returns Maya Lin Chen. The space is the delimiter, and TRUE tells Excel to ignore empty cells. TEXTJOIN is available in Microsoft 365 and Excel 2019 or later. If your version does not support it, join the required cells with ampersands and separators, then check for extra spaces.
  7. Use Flash Fill for a quick one-time result. With the same first-name and last-name layout in A2:B100, type the desired full name in C2, such as Maya Chen. Select C3, then choose Data > Flash Fill, or press Ctrl+E on Windows. Excel uses the example to infer the pattern and fills the remaining rows. Look through the output, especially rows with missing middle names, suffixes, or unusual spacing. Flash Fill writes values rather than live formulas, so later changes to the source names do not automatically update the combined column. On Mac, use Data > Flash Fill if it appears in your Excel version; the keyboard shortcut can differ. Excel for the web may not offer the same Flash Fill commands, so use a formula there if the command is unavailable.
  8. Use Power Query if you will repeat the task. Select your data, including its headings, and choose Data > From Table/Range. If Excel asks, confirm that the table has headers. In the Power Query Editor, select the name columns in the order you want them joined, then choose Transform > Merge Columns. Choose Space as the separator, enter a new column name such as Full Name, and select OK. Choose Home > Close & Load to return the result to Excel. Power Query is useful for a recurring import because you can refresh the query after updating the source data. It produces a query output, not a formula in each row.
  9. Review the results before removing anything. Check the first few rows, a few rows in the middle, and the last row. Look for missing names, doubled spaces, and names in the wrong order. If the formula results are correct and you need fixed text, copy the result column, then use Home > Paste > Paste Values in the destination. Keep an untouched copy of the original columns until you have confirmed the pasted values.

Common Mistakes

  • Using Merge & Center to join names. That command is for cell layout, not combining text. It can keep only the upper-left cell’s contents when multiple populated cells are merged. Use a formula, Flash Fill, or Power Query instead.
  • Forgetting a separator. Joining A2 and B2 directly with no space can produce MayaChen. Include a space in quotes or select a space delimiter in Power Query.
  • Overwriting the source data too soon. A formula may be correct but still rely on the original columns. If you delete those columns, the result can change or break. Copy and paste values only after checking the output, and retain a backup if the source matters.
  • Assuming every row follows the same pattern. A person may have a blank first name, a compound surname, a suffix, or a preferred display order. Inspect exceptions rather than assuming that one formula handles every naming convention perfectly.
  • Expecting Flash Fill or Power Query to update like a formula. Flash Fill creates static values. Power Query updates when you refresh the query. A cell formula recalculates when its referenced cells change.

Tips

  • Keep separate source columns and create a new Full Name column. This makes sorting, filtering, and later edits easier than storing only a combined name.
  • Use headings and an Excel table for growing lists. Select the range and choose Insert > Table; a table can make it easier to manage records as you add rows. Check that the table range includes all the name columns.
  • Choose the separator to suit the purpose. A single space is typical for a display name; a comma may be useful for “Last, First.” Verify that the separator does not conflict with how you plan to export or reuse the text.
  • Names do not have one universal structure. Some people use multiple given names, compound family names, or a different name order. If a spreadsheet is used for matching records, keep the original fields rather than relying on a display name alone.
  • When sending a workbook to someone who does not need formulas, copy the completed results and paste values into a separate column or file. This prevents the output from depending on source cells that might later be moved or deleted.
  • On Windows, Ctrl+C and Ctrl+V copy and paste, and Ctrl+Z undoes an action. On Mac, use Command+C and Command+V, and Command+Z. Undo works for ordinary edits, but it cannot restore information lost by saving over the only copy; keep a backup before making major changes.

Troubleshooting

The result has no space between names. Check that the formula includes a quoted space between the ampersands, or that Power Query’s separator is set to Space. If you used Flash Fill, provide a clear example with the intended spacing and run Flash Fill again.

There are extra spaces or a blank appears as a gap. For a two-column formula, use the TRIM version described above. If you have three or more parts and some can be blank, use TEXTJOIN with its ignore-empty option when your Excel version supports it. A cell that looks blank may contain a space or other invisible character; inspect or clean the source data if the result remains odd.

The formula appears as text instead of calculating. Check that the cell is not formatted as Text. Change its format to General using Home > Number Format, then edit the cell and press Enter. Also confirm that the entry begins with an equals sign and that Show Formulas has not been turned on. On Windows, Ctrl+` toggles formula display; the key combination can vary by keyboard layout.

Only some rows filled down. Double-clicking the fill handle depends on an adjacent column having continuous data. If there are gaps, drag the handle to the last row or copy the formula, select the full destination range, and paste. Check that the starting formula references the correct row.

Flash Fill does not recognize the pattern. Enter a second or third example that makes the format unambiguous, then select the next result cell and choose Data > Flash Fill again. If names have inconsistent structures, a formula or manual review may be more dependable.

Power Query does not show the expected new names. Confirm you merged the columns in the right order and chose the correct separator. If the source table has changed, use Data > Refresh All. If the source range grows, check that it is part of the table or query source; rows outside that source will not appear automatically.

Frequently Asked Questions

Can I combine first and last names without a formula?
Yes. Type the first completed name as an example in a blank column and use Data > Flash Fill. Review the values because Flash Fill does not recalculate when the source changes.

How do I combine three name columns and skip blanks?
With the name parts in A2:C2, enter =TEXTJOIN(" ",TRUE,A2:C2) in D2. It joins nonblank parts with spaces. TEXTJOIN requires Excel 2019 or later, including Microsoft 365.

Will merging names change the original columns?
No. A formula, Flash Fill, or Power Query can put the combined result in a separate output column. The original cells remain in place unless you overwrite or delete them yourself.

Can I turn formula results into regular text?
Yes. Copy the result cells, then choose Home > Paste > Paste Values. The displayed names remain, but the formulas are replaced by fixed text.

Why shouldn’t I use Merge & Center?
Merge & Center combines the selected cells’ layout, not the text inside them. When more than one selected cell contains a value, Excel may retain only the upper-left value. Use a text-joining method instead.

Which method is best for a list I update regularly?
Use formulas when you want each row to update as source names change. Use Power Query for a repeatable import and refresh workflow. Flash Fill is best suited to a quick, reviewed set of static results.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.