Excel Merge Cells and Keep All Text Without Data Loss

How-to basics · Updated November 3, 2026

Excel Merge Cells and Keep All Text Without Data Loss

Excel’s Merge Cells command does not combine the contents of multiple cells: it keeps the value in the upper-left cell and discards the other selected values. To merge cells and keep all their text, first join the contents with a formula such as =TEXTJOIN(" ",TRUE,A2:C2), copy the result into the upper-left cell as a value, clear the other cells, and then merge.

Why merging can lose text

A merged cell is one larger display area made from two or more neighboring cells. It is not a container that remembers each cell’s separate contents. When you merge a selection, Excel retains the contents of the selection’s upper-left cell; any contents in the other cells are removed. For example, merging A2:C2 when A2 contains “Red,” B2 contains “Blue,” and C2 contains “Green” leaves “Red” in the merged cell.

Excel may show a warning before completing a merge when more than one selected cell contains data. That warning is worth taking seriously: unmerging later does not bring back the deleted values. The safest habit is to make a copy of important data before changing its layout, then combine the text before using Merge Cells.

Join the contents before merging

For a row of cells, TEXTJOIN is usually the clearest way to combine text because it lets you choose a separator and skip empty cells. Put the formula in a blank helper cell outside the range you plan to merge. With “Red” in A2, “Blue” in B2, and “Green” in C2, enter this in D2:

=TEXTJOIN(" ",TRUE,A2:C2)

The result in D2 is Red Blue Green. The first argument is the separator; here it is a space. The second argument, TRUE, tells Excel to ignore empty cells. The last argument is the range to join. If B2 is blank, the result is “Red Green,” without an extra separator for the empty cell.

Choose a separator that makes sense for the information. For a list of departments, use a comma and space; for a name that should read naturally, use a space. With A2:C2 holding “Red,” “Blue,” and “Green,” this formula produces “Red, Blue, Green”:

=TEXTJOIN(", ",TRUE,A2:C2)

TEXTJOIN is available in Microsoft 365 and recent perpetual versions of Excel, including Excel 2019 and later. In older Excel versions without TEXTJOIN, join a small fixed number of cells with the ampersand operator instead. For A2, B2, and C2, this formula puts spaces between the three entries:

=A2&" "&B2&" "&C2

Unlike TEXTJOIN with TRUE, that expression does not automatically skip blanks, so it can leave extra spaces. If blank cells are possible, inspect the result or use a formula suited to the version of Excel you have.

Exact steps in Excel for Microsoft 365 on Windows

Use a helper cell so the combined result is calculated before any source data is cleared. For example, suppose A2:C2 contains the text to combine and D2 is empty:

  1. Click D2, enter =TEXTJOIN(" ",TRUE,A2:C2), and press Enter. Check that the result contains the text you need and the separators look right.
  2. Copy D2. Select A2, the upper-left cell of the range that will be merged.
  3. Choose Home > Paste > Values. This replaces A2 with the combined text rather than placing a formula that depends on the original cells.
  4. Clear the remaining source cells, B2:C2. Select them and press Delete, or use Home > Clear > Clear Contents. Do not clear D2 until you have confirmed the combined text is in A2.
  5. Select A2:C2, then choose Home > Merge & Center ▼ > Merge Cells. This merges the range without centering the text.

In Excel for Microsoft 365 on Windows, Alt, H, M, M is the ribbon KeyTips sequence for Merge Cells. Press the keys in sequence rather than holding them all down. Because the command removes non-upper-left values, the formula-and-copy steps still need to happen first. On Mac, use the Home tab’s Merge & Center menu; Windows Alt keytips do not apply. Excel for the web also has merge commands on its ribbon, though the precise ribbon presentation can vary with the window size.

Choose a separator and preserve readable results

The separator is part of the result, so think about how the combined value will be read, searched, or exported. A space is suitable for first and last names; a comma followed by a space can make a short list easier to scan; a slash can distinguish codes or categories. A separator is literal text, not a formatting instruction. It will appear wherever two nonempty entries meet.

TEXTJOIN joins values as text, but it does not necessarily preserve the way a number or date looks in its original cell. A date may be stored as a serial number, and a currency value may have been displayed with a currency format. If the range contains dates or formatted numbers, check the result carefully. If necessary, convert the value to the display you want with TEXT before joining, or type the desired wording into a helper cell. For instance, a date displayed as “Nov 2, 2026” may need an explicit date format in the formula rather than relying on the source cell’s appearance.

After creating the merged cell, use Home > Wrap Text if the combined text is too long for one line. You can adjust the column width or row height as well. Center Across Selection is another option for a heading: it can center text across selected columns without actually merging the cells. That preserves the individual cells, which is useful when the range is part of a table or will be sorted later.

Combining several rows safely

If each row contains a separate record, combine each row independently rather than merging a large block of many rows and columns. For example, if A2:C10 contains three pieces of text for nine records, put the TEXTJOIN formula in D2, using A2:C2 as its range, then fill the formula down through D10. The row references adjust as the formula is filled. Review each result before replacing source values.

For a repeatable layout, you might keep the combined results in column D and leave the original columns untouched. That is often safer than merging each row: it preserves the source data, keeps a consistent grid, and makes sorting, filtering, and formulas easier. If a merged appearance is essential, process one row at a time after saving or duplicating the worksheet. Confirm that every output is correct before clearing the corresponding source cells.

Do not merge cells across records in a dataset simply to make the sheet look compact. Excel tables do not support merged cells within the table body, and merged cells can interfere with sorting, filtering, selecting ranges, and filling formulas. A heading above a table may be merged if desired, but keep the actual rows and columns of the data unmerged.

Common problems and how to fix them

  • Some words disappeared: If the cells have already been merged, unmerge them with Home > Merge & Center > Unmerge Cells and check whether the source values still exist. Unmerging cannot restore values Excel discarded. Use Undo immediately if the merge was the last action; otherwise recover from a saved copy, version history, or another source if available.
  • The formula displays a result you did not expect: Check the chosen range and separator. TEXTJOIN skips blank cells only when its second argument is TRUE. Cells containing formulas that return an empty string may also affect results differently from genuinely empty cells, so inspect the source cells if separators look unusual.
  • The formula appears as text: Confirm that the cell is not formatted as Text, and that the formula begins with an equals sign. If the cell was set to Text, change its format to General and re-enter the formula.
  • The merged text is not visible in full: Turn on Home > Wrap Text, widen the column, or increase the row height. A merged cell can make automatic sizing less convenient, so adjust the dimensions manually if needed.
  • The merge option is unavailable: Check whether the worksheet is protected, whether cells are in an Excel table, or whether the selection includes an incompatible area. Keep table data unmerged; place any merged heading outside the table.

Merge Cells versus Merge & Center and alternatives

The Merge & Center menu includes several commands that sound similar but behave differently. Merge & Center merges the selected cells and centers the remaining upper-left value. Merge Cells combines the area without centering it. Merge Across merges cells separately in each selected row, rather than creating one merged block for the whole selection. All merge options can discard contents outside the upper-left cell of each merged area, so they are not substitutes for joining text first.

For a title that should visually span columns but does not need to be a merged cell, select the range and open Format Cells with Ctrl+1 on Windows. On the Alignment tab, choose Center Across Selection in the Horizontal list. This keeps the cells separate while centering the entry across the selection. On Mac, use Command+1 to open Format Cells, then look for the same alignment option. Ribbon and dialog labels can vary slightly by Excel release.

For combining values without changing the grid, retain the TEXTJOIN result in a helper or output column. This is generally the most practical choice for data that people may sort, filter, analyze, or import into another program. Merge only when the visual layout is genuinely more important than maintaining a regular cell structure.

Frequently Asked Questions

Can Excel merge cells without losing data?
Not by using the merge command alone. Excel keeps the upper-left cell’s value and removes the others. Join the values first, place the combined result in the upper-left cell, clear the other cells, and then merge.

How do I merge cells and keep all text with a space between words?
With the text in A2:C2, enter =TEXTJOIN(" ",TRUE,A2:C2) in a blank helper cell. Copy the result as a value into A2, clear B2:C2, and merge A2:C2.

Can I recover text after merging cells?
Unmerging does not recover values that were discarded. Use Undo if the merge was just performed, or restore an earlier workbook version or backup. Excel’s merge warning is a reminder to combine or copy the contents first.

Does Merge Across keep all the text?
No. Merge Across merges each row separately, but it still retains only the upper-left value within each row’s merged section. Combine each row’s contents before applying the command.

Why should I avoid merged cells in a data table?
Merged cells disrupt the regular rows and columns that sorting, filtering, and analysis rely on; they are also not allowed within an Excel table’s data body. Keep the data unmerged and use a heading or Center Across Selection for visual emphasis.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

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

Spotted an error in this guide? Let us know.