What merging cells does and why you might want it

Merging cells in Excel combines two or more adjacent cells into a single larger cell. When you merge, Excel keeps the content from the top-left cell and discards anything in the other cells, then displays that content centered across the merged area. The result looks cleaner for headers or labels that span multiple columns, but merging creates real problems if you plan to sort, filter, or do calculations with your data later.

Most spreadsheet work goes smoother without merging. If you merge cells in a data table and then try to sort by column, Excel either refuses to sort or sorts incorrectly because merged cells break the rectangular structure it expects. Formulas also behave unpredictably around merged cells. The safest approach: use merging only for titles, labels, or decorative headers that sit above your actual data, not within it.

Key Takeaways

  • Select the cells you want to merge, then go to the Home tab, click Merge & Center in the Alignment group, and choose your merge style.
  • Merging deletes content from all cells except the top-left one, so copy any data you need before you merge.
  • Merged cells break sorting, filtering, and some formulas, so avoid merging cells that contain data you plan to analyze.
  • Use merging for titles and section headers above your data, not for cells within your data table itself.

The step-by-step process for merging cells

Open your spreadsheet and click on the first cell you want to merge. Hold Shift and click on the last cell in the range you want to combine — for example, if you want to merge A1 through D1, click A1, then Shift-click D1. All cells in that rectangle will highlight in blue.

Go to the Home tab at the top of the ribbon. In the Alignment group (toward the right side of the Home tab), you will see a button labeled Merge & Center with a small dropdown arrow next to it. Click the arrow to see your options: Merge & Center, Merge Across, Merge Cells, and Unmerge Cells. Choose Merge & Center if you want the content centered across the merged area, or Merge Across if you want it left-aligned. Click your choice, and the cells merge immediately.

If any of the cells you selected contained data other than the top-left cell, Excel will warn you that it is about to delete that content. Read the warning carefully — once you confirm, that data is gone. If you need to keep it, click No, copy the content from the other cells to somewhere safe first, then merge again.

What happens to your data when you merge

Excel keeps only the content from the top-left cell in the merged range and removes everything else. If cell A1 contains "January" and B1 contains "Sales," merging A1:B1 will keep "January" and delete "Sales." This is why the warning matters — it is your only chance to stop before losing information.

The merged cell still occupies the same rows and columns as before, but it functions as a single unit. If you later unmerge it, the content reappears only in the top-left cell. The other cells return to normal but remain empty. This is another reason to avoid merging cells that contain data: you cannot recover what was deleted by unmerging.

Why merged cells cause problems with sorting and filtering

When you sort a column in Excel, the program assumes each column is a continuous list with one header row. Merged cells break this assumption. If you have merged cells within your data range and try to sort, Excel either displays an error message or sorts only part of your data, leaving rows misaligned. Your data ends up scrambled instead of organized.

Filtering has similar issues. Excel uses the header row to create filter buttons, but merged cells in the header confuse the filter logic. You may find that some columns do not get filter buttons, or that filtering one column does not work as expected. The safest rule: never merge cells that are part of your actual data table. Merge only the title row above the table or section labels to the left of it.

Formulas and merged cells do not always work together

If you write a formula that references a merged cell, Excel treats the merged cell as if it were only the top-left cell of the original range. This usually works fine for simple references like =A1, but it can cause confusion if you are not aware of it. More problematic: if you create a formula in a merged cell and then unmerge it later, the formula may behave unexpectedly because it was written with the assumption that the cell was merged.

Avoid putting formulas inside merged cells when possible. If you must, keep the merge permanent and do not unmerge later. For calculations that reference merged cells, test the formula carefully to make sure it is reading the value you expect.

How to unmerge cells and get them back to normal

Select the merged cell by clicking on it once. Go to the Home tab, click the Merge & Center dropdown arrow, and select Unmerge Cells. The merged cell splits back into its original separate cells. The content stays in the top-left cell, and the other cells become empty again.

If you unmerge and realize you made a mistake, you can undo the action immediately by pressing Ctrl+Z (or Cmd+Z on Mac). Once you have made other changes to the spreadsheet, undo may not work, so unmerge carefully if the content matters.

Better alternatives to merging for headers and labels

Instead of merging cells for a title, put the title in a single cell and make that cell taller by increasing the row height. This keeps your data structure clean and avoids the sorting and filtering problems that merged cells create. Go to the row number on the left, right-click it, and select Row Height to make it taller.

For labels that span multiple columns, use center alignment within a single cell instead of merging. Click the cell, go to Home, and in the Alignment group, click the center alignment button. The text will center within that one cell without merging. If you want text to appear centered across multiple columns visually, you can also use the Format Cells dialog to set the alignment to "Center Across Selection" — this centers text across multiple cells without actually merging them, so sorting and filtering still work normally.

Frequently Asked Questions

Can I merge cells if they contain different data?

Excel will merge them, but it keeps only the content from the top-left cell and deletes everything else. You will see a warning before this happens. If you need to keep all the data, copy the other cells to a different location first, then merge.

What if I merge cells and then want to sort my data?

Excel will either refuse to sort or sort incorrectly. Unmerge the cells first, then sort. This is why it is best to avoid merging cells within your data table from the start — use merging only for titles and headers above the table.

Does merging cells change the cell reference in formulas?

A merged cell is still referenced by its top-left cell address. If you merge A1:D1, the merged cell is still called A1 in formulas. Unmerging does not change the reference, but it can cause unexpected behavior if the formula was written assuming the cell would stay merged.

Can I merge cells in different shapes, like an L or a T?

No. Excel only merges rectangular ranges — cells that form a solid block with no gaps. You can merge A1:C3 (a rectangle), but not A1, B2, and C3 (scattered cells) or an irregular shape.

Will merging cells make my file larger or slower?

Merging does not significantly affect file size or performance. The real cost is in usability — merged cells make sorting, filtering, and formula work harder and more error-prone. Avoid merging for practical reasons, not technical ones.