Merge the Contents of Two Cells in Excel with a Formula

Formulas & functions · Updated November 21, 2026

To combine the contents of two Excel cells without losing either value, enter a formula in a third cell. For example, if the values are in A2 and B2, type =A2&" "&B2 in C2 to join them with a space. The original cells remain unchanged, and the result updates when either source value changes. This is different from Excel’s Merge & Center command, which joins cells visually and can discard content.

What You’ll Need

  • An Excel workbook with the two cells you want to combine.
  • An empty cell for the combined result. Using a separate cell protects the original values.
  • A separator, if you want one between the values, such as a space, comma, hyphen, or line break.

The steps below are for Excel for Microsoft 365 on Windows. The same formulas work in Excel for Mac and Excel for the web, although some ribbon labels or shortcuts can differ slightly.

Step-by-Step

  1. Check the two source cells. Identify which cells hold the pieces of information and decide their order. For this example, A2 contains Ada and B2 contains Lovelace. The combined text will follow that order. If one cell is blank or contains a number or date, consider how you want that value to appear before combining it.
  2. Choose an empty destination cell. Click a blank cell where the result should appear, such as C2. Do not type the formula over A2 or B2 unless you have already copied the original information somewhere safe. A formula placed in a separate cell is easier to check and can be changed later.
  3. Enter a formula with a separator. With the first value in A2 and the second in B2, enter this formula in C2 to put a space between them: =A2&" "&B2. Press Enter. C2 displays Ada Lovelace. The ampersand joins text, while the quoted space supplies the gap. Without that quoted space, the result would read AdaLovelace.
  4. Choose a different separator if needed. Change the text between the quotation marks to the punctuation or spacing you want. With the first value in A2 and the second in B2, this formula joins them with a comma and a space: =A2&", "&B2. If A2 contains Paris and B2 contains France, the result is Paris, France. For an ID assembled without spacing, use =A2&B2 with those same source cells.
  5. Check that the result is correct. Click the destination cell and check both the displayed result and the formula bar. Confirm the values are in the intended order, the separator is right, and no letters or digits are missing. If the cell shows the formula itself instead of its result, see Troubleshooting below; the destination may be formatted as Text.
  6. Fill the formula down for other rows. If each row has a pair of values in columns A and B, select C2 and drag the small square at the lower-right corner of the selection down the column. Excel adjusts the references for each row, so the next result uses A3 and B3. You can also select the destination range, such as C2:C20, and press Ctrl+D on Windows to fill down from its top cell. On a Mac, use Home > Fill > Down if the shortcut differs in your setup.
  7. Keep the formula or save fixed results. Leave the formulas in place if the combined text should change whenever either source cell changes. To keep only the current results, copy the result cells, then use Home > Paste > Paste Values to replace the formulas with their displayed text. In Excel for Mac or the web, look for Paste Values in the Home tab’s Paste menu. Check the pasted results before deleting or changing the source cells.

For a combination of more than two cells, the same approach can be extended by adding another ampersand and cell reference. With values in A2, B2, and C2, enter =A2&" "&B2&" "&C2 in D2 to put a space between each value. If some cells may be blank, test the result on representative rows so you can confirm that the separators do not leave unwanted spaces or punctuation.

Common Mistakes

  • Using Merge & Center to join text. That command combines the selected cells into one larger cell for layout; it does not concatenate their contents. If both selected cells contain values, Excel keeps the upper-left value and warns that the other content will be lost. Cancel if that is not what you want, and use a formula instead.
  • Forgetting the separator. The formula =A2&B2 joins values directly. That may be right for codes, but it can make names or words difficult to read. Add a quoted space or other separator where appropriate.
  • Typing the formula into a source cell. Overwriting A2 or B2 can remove information the formula needs. Put the result in a separate cell and retain a backup before replacing source data.
  • Assuming a formula result is fixed text. A formula remains linked to its source cells. If you need a permanent snapshot, copy the results and paste values.
  • Expecting a number or date to keep its cell formatting. Concatenation uses the underlying value, not necessarily the way the source cell displays it. Dates may appear as serial numbers, and number formatting such as leading zeros may not carry over. Use a format-aware formula or prepare the source values as text when the exact display matters.

Tips

  • Pick a separator that fits the data. Use a space for a person’s name, a comma and space for a location, or a hyphen for a code that should be readable. Type the separator inside straight quotation marks in the formula.
  • Use the ampersand for a simple, readable formula. It is a convenient way to join two values and works across current Excel versions. For a longer formula, keep references in a consistent order and check the result on a row where every source cell is populated.
  • Preserve leading zeros deliberately. If a value such as 007 is stored as the number 7 with a custom number format, a joined formula may return 7. Store identifiers as text when possible, or apply an appropriate text format within the formula before joining.
  • Use a line break when the combined content should wrap onto two lines. With the first value in A2 and the second in B2, enter =A2&CHAR(10)&B2 in C2. Turn on Home > Wrap Text for C2 so both lines are visible. The formula joins the values with a line-break character.
  • Keep source and result columns clearly labeled. Headings such as First name, Last name, and Full name make it easier to tell which cells are inputs and which contain formulas, especially when sharing the workbook.

Troubleshooting

  • The formula appears as text. Select the destination cell and check Home > Number Format. If it is set to Text, change it to General, then edit the cell and press Enter again. Also check that the formula starts with an equals sign and that Show Formulas is not enabled. On Windows, Ctrl+` toggles Show Formulas; the keyboard equivalent can vary on Mac.
  • The result has no space or punctuation. Check the characters between the quotation marks in the formula. For a space, there must be one space between the quotation marks. If you copied a formula from another source, replace curly quotation marks with straight quotation marks typed in Excel.
  • A date appears as a large number. Excel stores dates as serial values, and a basic join may expose that value. With a label in A2 and a real date in B2, use this formula in C2 to display the date in a readable month-day-year style: =A2&" "&TEXT(B2,"mmm d, yyyy"). The displayed month text can vary with Excel’s regional settings.
  • The formula returns an error or unexpected result. Confirm that the cell references point to the intended row and that there are no errors in the source cells. When filling down, check whether the formula references advanced as expected. A result such as #VALUE! can also come from an error already present in a referenced cell.
  • The result does not change after editing a source value. Check that the destination contains a formula rather than pasted values. If it is still a formula, confirm calculation is set to Automatic under Formulas > Calculation Options. In Manual mode, press F9 on Windows to recalculate; on Mac, use Formulas > Calculate Now if needed.

Frequently Asked Questions

Does Merge & Center combine the text from two cells?
No. It merges cells for layout and retains only the value in the upper-left cell when the selection contains multiple entries. Use a concatenation formula to combine the contents and preserve both source values.

Can I combine two cells and remove the originals?
Yes, but first verify the result and make a copy of the source data. Copy the formula results and paste values into the destination, then remove the original columns only if nothing else in the workbook depends on them. Deleting source cells that formulas still reference can break those formulas.

Can I combine the contents with no space between them?
Yes. With the values in A2 and B2, enter =A2&B2 in another cell. This is useful for codes or strings that should join directly, but it can make ordinary words run together.

Can I combine cells from different worksheets?
Yes. In a formula, refer to the sheet name and cell, for example =Sheet1!A2&" "&Sheet2!B2. If a sheet name contains spaces, surround it with single quotation marks, such as ='Customer Data'!A2. The source cells can be in different worksheets as long as the references are correct.

Will the formula work in Excel for Mac or Excel for the web?
Yes. The ampersand formula works in Microsoft 365 on Windows, Excel for Mac, and Excel for the web. The formula syntax is the same; ribbon locations and keyboard shortcuts may vary by platform.

How do I combine cells when one of them might be blank?
A basic formula still works, but it may leave an extra separator if a source is empty. Check the output for blank rows and choose a formula or method that handles empty cells the way your data needs. For a small list, a quick review of the results may be enough before you paste values or share the workbook.

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.