To merge the contents of two cells in Excel, combine them with a formula such as =A2&" "&B2. If A2 contains Ada and B2 contains Lovelace, the result is Ada Lovelace. This joins the values without deleting either source cell; Excel’s Merge & Center command is a different feature and can discard data.
What merging data means in Excel
People use “merge cells” to mean two different things. Joining data means creating one text result from the contents of separate cells—for example, putting a first and last name together. The original cells remain available, and you can choose whether the result updates when either source changes.
By contrast, the ribbon command for merging cells changes the worksheet layout. With two neighboring cells selected, Merge & Center makes them one larger cell. Excel keeps the value from the upper-left cell and removes the other selected values. That is generally unsuitable for combining names, addresses, or other records.
For a data list, use a formula or another joining method. The formula result can go in a new column, leaving the source columns intact. That is safer for checking the result and easier to reverse than altering the original data.
Join two cells with the ampersand formula
The ampersand (&) is the simplest way to join cell contents. It works in current Excel and older versions, and it lets you place spaces or punctuation between the values. In Microsoft 365 for Windows, select the cell where the combined result should appear, type the formula, and press Enter.
- With a first name in A2 and a last name in B2, enter
=A2&" "&B2to produce Ada Lovelace when those are the source values. - With a city in A2 and a country in B2, enter
=A2&", "&B2to produce Paris, France. - With a product code in A2 and a suffix in B2, enter
=A2&B2to join them with no separator. For example, AB and 42 produce AB42.
The quoted text in a formula is a literal separator: a space, comma, hyphen, or other text that Excel inserts between the cell values. Change that text to suit the desired result. If you leave it out, Excel puts the values directly beside one another.
After entering a formula in the first result row, copy it down to apply it to other records. You can drag the fill handle—the small square at the bottom-right corner of the selected cell—or double-click it when there is a neighboring column of continuous data. Excel adjusts relative references as the formula is filled: the next row typically changes from A2 and B2 to A3 and B3.
Choose CONCAT or TEXTJOIN when useful
The ampersand is usually enough for two cells, but Excel also has functions for joining text. CONCAT joins text arguments without inserting a separator automatically. With a first name in A2 and a last name in B2, enter =CONCAT(A2," ",B2) to return Ada Lovelace. CONCAT is available in Microsoft 365 and newer Excel versions; ampersand formulas are a more compatible choice when sharing a workbook with people using older releases.
TEXTJOIN is useful when you want one separator and may have blank cells. With names in A2 and B2, enter =TEXTJOIN(" ",TRUE,A2,B2). The space is the separator, and TRUE tells Excel to ignore empty cells. If B2 is blank, the result is the value from A2 without an extra trailing space. TEXTJOIN is available in Excel 2019 and Microsoft 365.
For only two cells, these functions are alternatives rather than requirements. CONCAT does not skip blanks or add spaces on its own; TEXTJOIN has options for those cases. The ampersand remains easy to read when the joining rule is simple.
Handle empty cells, numbers, and dates
A straightforward formula can leave an unwanted separator if one source cell is blank. For instance, joining A2, a space, and B2 produces a trailing space when B2 is empty. That may not be visually obvious, but it can matter when the result is used for comparisons, exports, or other formulas. TEXTJOIN with its ignore-empty setting is often the cleanest fix for a simple separator.
When combining a number or date with text, remember that Excel joins the cell’s underlying value, not necessarily the display format you see in the grid. A date displayed as 2-Nov-2026 might appear as a serial number in a joined result. Use TEXT to specify how that value should appear.
With a label in A2 and a numeric price of 12.5 in B2, enter =A2&" - "&TEXT(B2,"$0.00"). If A2 contains Cable, the result is Cable – $12.50. The format code controls the displayed number of decimal places and currency symbol; choose a format appropriate to your data and locale. With a date in B2, a format such as mmm d, yyyy can create a readable date string.
Once a number or date is joined into text, the combined result is text, not a numeric value suitable for calculations. Keep the original numeric or date column for calculations, sorting by value, or date arithmetic.
Combine values on separate lines
Sometimes a single cell should contain two pieces of information on separate lines, such as a street address and an apartment number. With the first value in A2 and the second in B2, enter =A2&CHAR(10)&B2. CHAR(10) inserts a line break in the result.
To see both lines, select the result cell and choose Home > Wrap Text. You may also need to increase the row height, or use Home > Format > AutoFit Row Height. The formula still returns one cell value; the line break only changes how its text is displayed. This can be handy for labels, but separate columns are often better for sorting and filtering structured address data.
Fill a whole column with Flash Fill
Flash Fill can recognize a pattern from examples and create combined text without a formula. Suppose first names are in A2:A20 and last names are in B2:B20. Type the desired combined name in C2, type the next example in C3, then choose Data > Flash Fill, or press Ctrl+E on Windows. Excel may infer the pattern and fill the remaining cells.
Review the output before relying on it, especially if rows have inconsistent spacing, missing values, or different name formats. Flash Fill creates fixed text, not a formula linked to the source cells. If A2 or B2 changes later, the corresponding Flash Fill result does not update automatically. In Excel for the web, availability and controls can differ from the Windows desktop app; if the command is unavailable, use a formula instead.
Keep the result or replace it with fixed text
A formula is usually the best starting point because it preserves a live connection to the source values. If you need a fixed result for a handoff or export, copy the formula results and paste values into the destination. In Excel for Microsoft 365 on Windows, select the result range, copy it, then use Home > Paste > Values. This replaces the formulas in the pasted cells with their current displayed values.
For a safer workflow, paste values into a separate range or worksheet first, then check a few results. Keep the original source columns until you have confirmed the combined output. If you replace the formula cells with values, later edits to the source cells will no longer update those results.
Use Power Query for repeatable data preparation
If you regularly import a table and need to combine columns as part of a repeatable cleanup, Power Query can be more suitable than filling formulas manually. In Excel for Microsoft 365 on Windows, select a cell in the source table and choose Data > From Table/Range. In the Power Query Editor, select the columns to combine, then choose Add Column > Merge Columns. Select a separator and confirm the new column before choosing Home > Close & Load.
Power Query keeps the transformation steps so you can refresh the query when the source data changes. It does not behave like a cell formula that recalculates immediately with each edit; you refresh the query to apply the transformation again. For a one-off pair of cells, that setup is usually unnecessary. For recurring imports or a larger cleanup process, it can make the steps easier to repeat and audit.
Common problems and how to avoid them
- The formula appears as text: Check that the cell is not formatted as Text, and confirm the entry begins with an equals sign. Change the format to General, then re-enter the formula if necessary.
- The result has no space: Excel does not add separators automatically. Include the separator as quoted text between the cell references, such as a space or comma.
- A date looks like a serial number: Use TEXT with an explicit date format before joining it to other text.
- The output does not change: Flash Fill and pasted values are static. Use a formula if the result should respond to changes in the source cells.
- Source data disappears: Avoid Merge & Center when the goal is to join contents. It merges the cell layout and retains only the upper-left value.
Some Excel installations use semicolons instead of commas as formula argument separators because of regional settings. If a function formula shown here is rejected, check the list separator used by your Excel installation. The ampersand examples do not have function arguments, so they avoid that particular separator issue.
Frequently Asked Questions
How do I combine two cells in Excel and keep a space?
With values in A2 and B2, use =A2&" "&B2. The quoted space is inserted between the two values.
Does Merge & Center combine the contents of two cells?
No. It combines the selected cells into a larger worksheet cell and keeps only the value in the upper-left cell. Use a formula, CONCAT, or TEXTJOIN to join the contents.
Can I combine two cells without a formula?
Yes. Flash Fill can produce fixed text after you provide examples, and Power Query can combine columns during a repeatable import cleanup. Unlike a formula, those results do not recalculate immediately when a source cell changes.
How do I combine two cells but leave the originals unchanged?
Put the joining formula in a third, empty column. The source cells stay as they are, and the result updates when their contents change.
How do I join cells and remove extra spaces?
TEXTJOIN can skip blank cells when you set its ignore-empty argument to TRUE. For more complicated inconsistent text, clean the source values first or use a separate text-cleanup formula before combining them.
Related
- Excel Import CSV Data: Steps, Settings, and Fixes
- Excel Flash Fill: How to Use It and Choose Options
- Excel Scatter Plot: How to Create, Format, and Read It
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel Goal Seeking: Find a Target Value with What-If ToolsExcel Goal Seek finds the input value that makes a formula return a result you specify. In Excel…
- Excel Sort Numbers Low to High: Steps, Tips, and FixesTo sort numbers from low to high in Excel for Microsoft 365 on Windows, click a cell in…
- Excel ISBLANK Function Example: Formulas and TipsIn Excel, use =ISBLANK(A2) to test whether cell A2 is genuinely empty; it returns TRUE if the cell…
- Show Formulas in Excel Print: Steps and FixesTo show formulas in an Excel printout, turn on Show Formulas for the worksheet, then print it as…
- Excel MID and FIND Functions: How to Extract Text in ExcelWith the text INV-2026-047 in A2, use =MID(A2,FIND("-",A2)+1,4) to extract the year; the result is 2026. MID returns…
- Excel Data Analysis Books: How to Choose the Right OneGood Excel data-analysis books include Microsoft Excel Data Analysis and Business Modeling by Wayne L. Winston for business…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.