To combine a first name in A2 and a last name in B2 with a space between them, enter =A2&" "&B2 in C2 and press Enter. The result is one full name in a new cell; your original cells stay unchanged. You can then fill the formula down for the rest of the list.
What You’ll Need
- An Excel workbook with the two parts of each name in separate columns, such as first names in column A and last names in column B.
- A blank column for the combined names. Keeping the result in a separate column protects the source data and makes it easier to check the output.
- Microsoft Excel for Microsoft 365 on Windows for the steps below. The basic formula also works in current Excel for Mac and Excel for the web; menu locations and some shortcuts can differ.
Step-by-Step
- Check how the names are arranged. Identify which column contains the first part of each name and which contains the second. For example, A2 might contain “Maya” and B2 “Chen.” Make sure each row represents one person: the first name in row 2 should be paired with that person’s last name in row 2, not a name from the next row. If your data has headings in row 1, leave those headings in place and start the formula in row 2.
- Choose an empty output column. Click the cell on the same row as the first name pair. In this example, use C2. If column C already contains important information, choose another empty column. Do not type the formula over either source name, because the combined result depends on those cells and overwriting one can remove information.
- Enter the joining formula. With the first name in A2 and the last name in B2, enter
=A2&" "&B2in C2, then press Enter. The ampersands join the two cell values, and the quoted space supplies the gap between them. With Maya in A2 and Chen in B2, C2 should display “Maya Chen.” If your columns differ, replace A2 and B2 with the correct cells, keeping the quoted space between the ampersands. - Check the first result before copying it. Confirm that the name is in the intended order and that it contains exactly the separator you want. If the result reads “Chen Maya,” the formula probably refers to the columns in the wrong order. If it reads “MayaChen,” the space may be missing from the formula. Correct the first formula now rather than copying the same issue through the entire list.
- Fill the formula down the column. Select C2 again. Point to the small square at the lower-right corner of the selected cell, called the fill handle, and drag it down to the last row of names. Excel adjusts the references for each row, so the next formula refers to A3 and B3, then A4 and B4, and so on. If the source list is a continuous block, you can also double-click the fill handle to fill down alongside the adjacent data. Check the last few rows to make sure the fill reached the end of your list.
- Use the Fill Down shortcut if you prefer. Enter the formula in C2, select the range C2:C20 (or the range covering your actual list), and press Ctrl+D on Windows. Excel copies the top cell’s formula down through the selected range. In Excel for Mac, the equivalent shortcut is Command+D. In Excel for the web, dragging the fill handle is a straightforward alternative if the shortcut behaves differently in your browser or keyboard setup.
- Decide whether the results should remain formulas. A formula result updates if either source name changes, which is useful for a working list. If you need fixed text for an upload or handoff, select the completed results and copy them. Then use Home > Paste > Paste Values to replace the formulas with their displayed text. Keep a copy of the original workbook or source columns before replacing formulas, especially when the combined names are being prepared for another system.
The basic formula uses Excel’s ampersand operator, so it does not require a special add-in or a particular workbook format. It is often the simplest choice for joining two name cells. The formula creates a combined value in a third cell; it does not merge the worksheet cells themselves. That distinction matters because Excel’s Merge & Center command combines cells’ layout, not the text stored in two cells.
Common Mistakes
Leaving out the separator. Joining A2 and B2 without a space gives a result like “MayaChen.” Put a space in quotation marks between the references. If you want a comma and a space instead, use a comma inside the quoted text. The separator is ordinary text, so punctuation must be included in the quotation marks.
Using Merge & Center instead of a formula. Merge & Center is a layout feature, not a way to join two names. When multiple selected cells contain values, merging can keep only the upper-left cell’s content and discard the other cell’s content. Use a formula in an empty column when your goal is to preserve and combine both names.
Reversing the cell references. If the surname is in A2 and the given name is in B2, the standard example will produce the wrong order. Reference the cells in the order you want the text to appear. The formula does not know which value is a first name; it simply joins the cells as written.
Copying the formula into the wrong rows or columns. Relative references change when you fill a formula, which is what normally makes filling down work. But if the list has blank rows or names in different columns, review the resulting formulas and outputs. A blank row can interrupt double-click fill behavior, so dragging across the complete output range or selecting the range and using Fill Down can be more reliable.
Overwriting the source data too soon. A formula depends on the original cells. If you paste over those cells or delete them, the result may change or become an error. Keep the source columns until you have checked the combined names and, if needed, made a separate values-only copy.
Tips
For a list with occasional empty name cells or extra spaces already present in the source, you can clean the combined text as it joins. With the first name in A2 and last name in B2, enter =TRIM(A2&" "&B2) in C2. TRIM removes spaces at the start and end of the resulting text and reduces repeated regular spaces to one, so a missing value at either end is less likely to leave an unwanted leading or trailing space. Fill this formula down in the same way as the basic one.
TRIM is helpful for ordinary spaces, but it does not remove every unusual character that can arrive in copied data. For example, text pasted from a webpage may contain a nonbreaking space. If one name still looks oddly spaced after using TRIM, retype the space in the source cell or clean the source text separately before joining it.
Choose a separator that fits how the names will be used. A single space works for most full names. A comma and space can be useful for displaying “Chen, Maya,” while a hyphen or other punctuation may suit a particular naming convention. Decide on the display order before filling the formula down, and use the same separator consistently unless your data requires exceptions.
Keep the first and last name columns until you have reviewed the output. Compare several rows, including the first row, the last row, and any records with middle initials, compound surnames, or blank cells. Names do not all follow the same structure, so a formula that joins two columns cannot infer where a multi-part surname begins or whether a title belongs in the result.
If you convert the formulas to values, do it in a new column or after saving a backup. Values are convenient when another system needs plain text, but they no longer update when the original names change. Formulas are better while the list is still being edited; fixed values are useful once the names have been checked and finalized.
Troubleshooting
The result has no space. Edit the formula and check that it includes a space between quotation marks: " ". A formula such as =A2&B2 joins the values directly. If you need a different separator, put that character inside the quotation marks.
The result shows the formula instead of a name. First, check whether the cell is formatted as Text. Select the formula cell, choose Home > Number Format > General, then edit the formula by pressing F2 and press Enter. Also check that the formula begins with an equals sign and that there is no apostrophe before it. If Show Formulas is switched on, press Ctrl+` on Windows to switch back to displayed results; on many Mac keyboards, use Control+`. The key is usually the grave-accent key, though its position varies by keyboard.
The formula returns an unexpected value or error. Check that each reference points to the intended row and column. If you inserted or moved columns, Excel may have adjusted references; click the output cell and inspect the formula bar. If a referenced cell contains an error, joining it will not make that error disappear. Correct the source error first, then check the combined result again.
Only the first row is filled. Confirm that you dragged the fill handle rather than moving the cell border, and that the selection extended to the final row. For a fixed range, select the formula cell and the cells below it, then use Ctrl+D on Windows or Command+D on Mac. If double-clicking the fill handle stops early, a blank or gap in the neighboring column may have prevented Excel from detecting the full list; drag to the last row yourself.
There are unwanted spaces in the output. Use the TRIM version of the formula and inspect the source values for irregular spaces. If pasted text contains a special space that TRIM does not remove, replace that character in the source cell or paste clean text into the source column. Be cautious about broad Find and Replace operations on a worksheet with other data, because they can alter text beyond the name list.
Frequently Asked Questions
Can I combine names from two cells without a space?
Yes. With the first part in A2 and the second part in B2, use =A2&B2. This joins the cell values directly. For most first-and-last-name lists, a space is easier to read, but the separator is your choice.
Will the combined name update when I edit either original cell?
Yes. The result remains a formula, so changing A2 or B2 updates the displayed text in C2. If you replace the formula with a pasted value, it will no longer update automatically.
Can I combine more than two cells?
Yes. Add another cell reference and separator in the same pattern. For example, if A2 contains a first name, B2 a middle name, and C2 a last name, join the first and middle names, then the last name, with spaces between the parts. Check rows with a blank middle name, because a basic formula can leave an extra space in that situation; TRIM can help with ordinary spaces.
Can I combine the names in the original cells?
A formula needs an output cell and should not overwrite the cells it refers to. Put the result in a spare column first. After checking it, you can copy the result and use Home > Paste > Paste Values in a destination column if you need fixed text, but preserve the original names until you know they are no longer needed.
Does this work in Excel for Mac or Excel for the web?
Yes. The ampersand formula works in current Excel for Mac and Excel for the web as well as Microsoft 365 for Windows. The ribbon layout can vary slightly by platform. For filling down, use the fill handle if the keyboard shortcut differs from the Windows Ctrl+D shortcut.
Related
- Hide Cells in Excel: Shortcut Keys for Rows and Columns
- How to Group Rows in Excel With Plus Signs at the Top
- Excel Group and Ungroup Shortcuts for Rows and Columns
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Close the Research Pane in Excel on WindowsTo close the Research pane in Excel for Microsoft 365 on Windows, click the X at the upper-right…
- Goal Seek in Excel: Step-by-Step InstructionsTo use Goal Seek in Excel for Microsoft 365 on Windows, select Data > What-If Analysis > Goal…
- Insert Entire Row in Excel: Shortcut and AlternativesIn Excel for Microsoft 365 on Windows, select any cell in the row and press Shift+Space to select…
- Schedule Repeat Emails in Outlook: Options and StepsOutlook can schedule an individual email to send later, but it does not have a built-in option to…
- Conditional Formatting Based on Another CellYes. In Excel for Microsoft 365, you can make a cell or range change format based on another…
- Excel Replace Shortcut: Use Ctrl+H and Find & ReplaceIn Excel for Microsoft 365 on Windows, press Ctrl+H to open Find and Replace on the Replace tab.…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.