To combine the contents of two cells in Excel, enter a formula such as =A2&" "&B2 in a third cell; if you mean joining the cells’ layout rather than their contents, use Home > Merge & Center instead. The formula keeps both values, while merging cells keeps only the value in the upper-left cell, so choose based on what you need to preserve.
Combining cell contents versus merging cells
People use “combine two cells” to mean two different things. You might want to join text stored in separate cells—for example, a first name and a last name—or make two neighboring cells look like one larger cell. Excel handles those jobs differently.
A formula combines values into a separate destination cell. The source cells remain in place and can still be edited independently. This is usually the right choice for names, addresses, product codes, and other data you want to use later. By contrast, Merge & Center changes the worksheet’s structure and appearance. It does not concatenate the two values.
For example, if A2 contains “Ada” and B2 contains “Lovelace,” a formula can show “Ada Lovelace” in C2. If you merge A2 and B2 instead, Excel retains the content of A2 and discards the content of B2. That difference is important whenever the cells contain information you cannot afford to lose.
Join two cells with a formula
The ampersand operator (&) is a straightforward way to join cell contents. It works in current Excel versions and gives you control over what, if anything, appears between the values. In the opening example, the space is text typed between quotation marks.
With the first name in A2 and the last name in B2, enter this formula in C2:
=A2&" "&B2
If A2 is “Ada” and B2 is “Lovelace,” C2 displays “Ada Lovelace.” The formula inserts one space; without the space between the quotation marks, the result would be “AdaLovelace.” You can replace that separator with a comma, hyphen, or other text. For example, =A2&", "&B2 produces “Ada, Lovelace” for the same inputs.
To apply the formula to more rows, select C2 and drag its fill handle—the small square at the lower-right corner of the selected cell—down the column. Excel adjusts the references for each row, so the next formula uses A3 and B3, then A4 and B4, and so on. You can also copy C2, select the cells below it, and paste.
Because this is a formula, the result updates when either source cell changes. That is useful for a live worksheet, but it also means the combined result is not independent of the original values. If you need a fixed text result, see the section on converting formulas to values.
Choose a separator and handle blank cells
Decide what should appear between the two values before filling the formula down. Names often need a space, city and state may need a comma and space, and parts of an identifier may need no separator. The separator is part of the formula, not a special Excel setting.
A simple ampersand formula can leave an extra space if one of its source cells is blank. If A2 contains “Ada” and B2 is empty, =A2&" "&B2 returns “Ada ”, with a trailing space. It may look like “Ada” on screen, but that extra character can matter when comparing text or exporting data.
With values in A2 and B2, this TEXTJOIN formula joins them with a space and ignores empty cells:
=TEXTJOIN(" ",TRUE,A2,B2)
With “Ada” in A2 and B2 blank, the result is “Ada,” with no extra trailing space. TEXTJOIN is available in Excel 2019 and Microsoft 365, among other newer Excel editions. If a workbook must work in an older Excel version that does not support it, use the ampersand method or check compatibility with the people who will open the file.
Ignoring empty cells is not always the right choice. For example, a blank field might indicate missing information that should be visible or investigated. Preview the results and decide whether to skip blanks, preserve a separator, or flag incomplete rows.
Use Flash Fill for a one-time combination
Flash Fill can recognize a pattern from examples and fill the rest of a column without leaving formulas in the results. It is handy when you need a one-time output, or when the desired formatting is more involved than joining two cells with a consistent separator.
- Keep the source data in separate columns, such as first names in A and last names in B.
- In C2, type the result you want, such as “Ada Lovelace.”
- Start typing the next expected result in C3. If Excel shows a preview of the remaining pattern, review it carefully.
- Accept the preview, or use Data > Flash Fill. In Excel for Microsoft 365 on Windows, Ctrl+E is also the Flash Fill shortcut.
Flash Fill writes values rather than formulas, so later edits to A or B do not automatically change the completed output. Review the entire column after filling: a few examples may not make an unusual pattern clear, particularly when names have middle names, suffixes, inconsistent spacing, or missing fields. Excel for the web and Mac can differ in available controls and keyboard shortcuts; where the Flash Fill command is available, use the Data tab rather than assuming the Windows shortcut applies.
Merge cells when you want one larger cell
If your goal is visual layout—for instance, a heading centered across several columns—select the cells and choose Home > Merge & Center. The command merges the selection into one larger cell and centers its content. Use the dropdown beside Merge & Center for other merge options, such as merging without centering, where available.
Before merging, make sure the upper-left cell contains the content you want to keep. Excel displays a warning if other selected cells contain data, because those other values are removed by the merge. Copy important values elsewhere first. A merged cell is not a safe way to join a first name and last name, since the content of the second cell will not be appended to the first.
Merged cells can also complicate sorting, filtering, and selecting consistent ranges. They may make a report heading look polished, but they are often inconvenient in a data table where each row should have the same structure. For a heading across columns, Center Across Selection—available through the Format Cells Alignment options—can sometimes provide a similar appearance without merging the underlying cells.
Turn a formula result into fixed text
A formula is usually best while the source cells may change. If you need the combined output to stay as it is—for example, before sending a copy of a list to someone—convert the results to values after checking them.
- Select the cells containing the combined formulas and copy them.
- Right-click the selected destination, choose Paste Special, and select Values. You can also use Home > Paste > Paste Values.
- Check several results, then remove the source columns only if they are no longer needed.
Paste Values replaces each formula with the text currently displayed by that formula. It does not merge cells, and it does not preserve the formula’s link to the source data. Keep a copy of the original columns if you may need to revise the result later.
Common problems and how to avoid them
- The result has no space: Add a separator between the references, such as the quoted space in
=A2&" "&B2. - The second value disappeared: You probably used Merge & Center rather than a formula. Undo promptly if possible, or restore the value from a backup or another copy.
- Numbers or dates look different: When Excel joins values as text, a number may not retain its displayed number format automatically. If a date or number needs a particular appearance, format it deliberately before combining, or use the TEXT function to specify a display format.
- Results do not update: Flash Fill and pasted values are static. Use a formula if the output should respond to edits in the source cells.
- The output has extra spaces: Check for spaces already present in the source values. TRIM can remove extra ordinary spaces from text, but it does not remove every possible whitespace character.
- A formula appears as text: Check whether the cell is formatted as Text or whether the entry begins with an apostrophe. Change the cell format to General, then re-enter the formula.
For dates that must appear in a specific style, with a date in A2 and a label or other value in B2, this formula formats the date as month/day/year before joining it to the second cell:
=TEXT(A2,"m/d/yyyy")&" "&B2
If A2 contains the date January 5, 2026, and B2 contains “Meeting,” the result is “1/5/2026 Meeting.” The displayed date format depends on the format string you choose; confirm that it matches the convention expected by the people using the workbook.
Frequently Asked Questions
Can I combine two cells without losing the original values?
Yes. Use a formula in a third cell, such as an ampersand formula, or use Flash Fill for a static result. Both leave the source cells intact. Merging is different and can discard content outside the upper-left cell.
Can I combine two cells and keep the result in the first cell?
You can calculate the combined result in another cell, copy it, and paste it back over one of the sources using Paste Values. Check the result before replacing either source, since overwriting a cell removes its original content.
Does Merge & Center combine the text in both cells?
No. It changes the cell layout and keeps only the upper-left cell’s value. To join text, use a formula or Flash Fill instead.
How do I combine cells down an entire column?
Enter the formula in the first result row, then use its fill handle or copy and paste it down. Check the last rows and any blanks to make sure Excel applied the pattern as intended.
Can I join two cells with a line break?
Yes. Join the first reference, a line-break character, and the second reference with the ampersand operator. Turn on Wrap Text so the line break can display within the cell, and adjust row height if needed.
Related
- Automate Text to Columns in Excel: Methods and Limits
- AutoCAD Excel Data Links: Insert and Update Tables
- Excel Autofill and Flash Fill: How Each Feature Works
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel: Hide the Page 1 Watermark and Restore Normal ViewTo hide the large gray “Page 1” watermark in Excel, switch the worksheet from Page Break Preview to…
- DAX: Create a Measure Based on a Column ValueYes. In DAX, a measure can return a result based on a column value: use CALCULATE to apply…
- Outlook Share Calendar Greyed Out? Causes and FixesIf Outlook’s Share Calendar button is greyed out, the calendar or account may not support sharing, or your…
- Google Sheets Dropdown From Range: Setup, Options & FixesYes. In Google Sheets, select the cells that need a dropdown, choose Data > Data validation > Add…
- Unable to Create a Signature in Outlook? Try These FixesIf you cannot create a signature in Outlook, first check which version you are using: classic Outlook for…
- Create a Name Tag Template in Word: Step-by-StepTo create a name tag template in Microsoft Word, choose the exact label or badge stock under Mailings…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.