Merge Cells Without Losing Data in Excel

When working in Excel, you may need to merge cells to improve data presentation, such as centering the table title at the top of the table.

To merge or combine cells in Excel, you can use the ‘Merge & Center,’ ‘Merge Across,’ and ‘Merge Cells’ merging options, which you can access by clicking the down arrow on the ‘Merge & Center’ split button in the Alignment group of the Home tab.

Merge and Center options in Excel

Note: The ‘Merge & Center’ option, usually the default option, merges the selected cells and centers any retained content in the combined cell. The ‘Merge Across’ option combines the selected cells in the same row into one large cell. The ‘Merge Cells’ option combines the selected cells and leaves the retained data in the merged cell without changing its alignment.

What Happens When You Merge Cells with Data?

When you merge or combine cells with data, all the data, except in the upper-left cell, is deleted. Let me give you an example to illustrate this fact.

Suppose you have the dataset below and want to merge cells A2 and B2.

Merge Cells Without Losing Data in Excel dataset

You can use the steps below:

  1. Select cells A2 and B2.
Select cells to merge
  1. Open the Home tab and click the ‘Merge & Center’ button on the Alignment group.
click the 'Merge & Center' button

Excel displays a warning message indicating that merging cells only keeps the upper-left value and discards other values.

warning message about merging cells
  1. Click OK.

The steps above merge cells A2 and B2 and delete the data in cell B2, leaving only the data in cell A2, as shown below:

cells have been merged
Also read: How to Unmerge All Cells in Excel?

Merge Cells Without Losing Data

Can we work around Excel’s limitation and retain all the data in merged cells? Yes, let me shows you how.

Method #1: Use Concatenation Functions

You can use the CONCAT or TEXTJOIN functions or the ampersand (&) operator to concatenate or join the values of cells in one cell before merging the cells.

Suppose you have the following dataset and want to merge the cells in columns A and B without losing data.

dataset to merge cells

Here’s how to do it:

  1. Use any of the following formulas in column C:
=CONCAT(A2," ",B2)
=A2&" "&B2
=TEXTJOIN(" ",TRUE,A2,B2)
CONCAT formula to merge cells

Note: We have combined columns A and B values using the space character (” “) as the separator. You can use other separators, such as commas or semicolons. If you do not want to use any separator, enter the formula as ‘=CONCAT(A2,B2).’

  1. Select the cell range C2:C6 and press CTRL + C to copy the contents.
  2. Select cell A2.
  3. On the Home tab, open the Paste drop-down menu and click the ‘Values’ option in the ‘Paste Values’ section.
open the Paste drop-down menu

The above step pastes the results of the formulas in column C as static values in column A.

  1. Delete the contents of column C.
  2. Select the cell range A2:B6.
Select the cells to merge
  1. On the Home tab, on the Alignment group, click the down arrow on the ‘Merge & Center’ split button and click ‘Merge Across.’
click 'Merge Across.'
  1. Click OK on the series of message boxes that appear until all the pairs of cells are merged, as shown below:
Merge Cells Without Losing Data in Excel

Method #2: Use the Fill Justify Option

You can use the Fill Justify option in Excel to combine the data in several rows in one column in one cell. This technique does not merge cells, but the results are similar to merged cells.

Let’s say you have the data below in one column and want to combine the data in one cell.

dataset

Here’s how to do it:

  1. Select the cells with the data you want to combine.
Select the cells
  1. Make the column wide enough to accommodate the data in one cell.
Make the column wide enough
  1. On the Home tab, on the Editing group, click the down arrow on the Fill icon and click the Justify option.
click the Justify option in Excel

The above steps move the data in the selected cells to the top-most cell as shown below:

Justify formatting applied to cells in Excel

The combined values may spread to two or more rows if the column is not wide enough to fit all the data in one cell. You can widen the column and repeat the process to ensure all data fits in one cell.

Note: The above technique has the following limitations:

  • Fill Justify only works within a single column.
  • It works for text only. It doesn’t work for numerical values or formulas.
  • It does not work well if empty cells are between the target cells.

Method #3: Use the Excel Clipboard

You can merge data in cells by copying data to the Excel clipboard and pasting it into a cell.

Suppose you have the dataset below and want to merge the data in columns A and B in a single cell.

Cells to merge in Excel

Here’s how to do it:

  1. Select the cell range A2:B6 and press CTRL + C to copy it.
  2. Click the dialog box launcher on the bottom left of the Clipboard group to open the Clipboard.
Click the dialog box launcher

The Clipboard pane opens on the left of the Excel window, showing the items you have copied.

Clipboard pane opens
  1. Select the cell where you want to paste the data and press F2 to enter edit mode. The cursor will blink inside the cell.
  2. Click the Paste All button on the Clipboard.

The merged data appears in the cell you selected, as shown below:

merged data appears in the cell

You can delete the original data and remain with the merged data.

Also read: How to Find Merged Cells in Excel?

An Alternative to Merge & Center in Excel

Merging cells in Excel can help present the data better by, for instance, centering the table title across the top of the table.

However, merging cells has the following adverse effects:

  • You cannot sort columns that have merged cells.
  • Flash Fill and AutoFill features cannot work on cell ranges that have merged cells.
  • You cannot convert a range with merged cells into a table.
  • Merged cells make accessing or referencing individual data pieces difficult. 

If you must merge cells, restrict merging to header rows or areas that do not involve data manipulation.

In this section, I will show you how to utilize the ‘Center Across Selection‘ option, which provides a similar visual effect to merging cells without the adverse effects mentioned above.

Use ‘Center Across Selection’ Option

Suppose you have the following dataset below and want to center the text in cell B3 across the cell range B3:D3.

Dataset to center text and merge excel

Here’s how to do it:

  1. Select the cell range B3:D3.
Select the cell range
  1. Press CTRL + 1 to open the Format Cells dialog box.
  2. On the Format Cells dialog box, click the Alignment tab, open the Horizontal drop-down menu, and select the Center Across Selection option.
select the Center Across Selection option
  1. Click OK.

The above steps will center the text in cell B3 across the cell range B3:D3, as shown below.

Center Across Selection applied in Excel

The result looks like merged cells, but they are not because you can individually select cells B3, C3, and D3.

Note: For the Center Across Selection to work, only the left-most cell in the selection should have data.

Other Excel articles you may also like:

I am a huge fan of Microsoft Excel and love sharing my knowledge through articles and tutorials. I work as a business analyst and use Microsoft Excel extensively in my daily tasks. My aim is to help you unleash the full potential of Excel and become a data-slaying wizard yourself.

Leave a Comment