What merging cells does and when to use it

Merging cells combines two or more cells into one larger cell. When you merge cells, Excel joins them visually and treats them as a single unit. The most common reason to merge is to create a title that spans across multiple columns, or to center a heading above a data table.

Before you merge, understand what happens to your data: Excel keeps only the content from the top-left cell and deletes everything in the other cells you are merging. If you have data in multiple cells you want to keep, copy it somewhere else first, or use a different approach like centering text across cells without actually merging them.

Merging is useful for formatting headers and titles. It is less useful for data cells because merged cells can cause problems when you sort, filter, or move data around later. If you are merging cells that contain numbers or information you need, reconsider whether merging is the right choice.

Key Takeaways

  • Merging cells deletes all content except what is in the top-left cell, so move your data first if you need to keep it.
  • Select the cells you want to merge, then use the Merge & Center button in the Home tab or the Format Cells dialog.
  • Center Across Selection is an alternative that makes text appear centered without actually merging the cells.
  • Merged cells can interfere with sorting and filtering, so use them mainly for titles and headers, not data.
  • To unmerge cells, select the merged cell and click Unmerge Cells in the Home tab.

How to merge cells using the Home tab

The fastest way to merge cells is through the Home tab. First, click on the cell you want to start with — usually the top-left cell of the range you are merging. Then hold Shift and click the last cell you want to include. This selects all the cells in between.

Once your cells are selected, look at the Home tab in the ribbon at the top. Find the Merge & Center button — it looks like a box with lines inside it. Click the small arrow next to it to see your options. Choose "Merge & Center" to merge the cells and center the text, "Merge Across" to merge without centering, or just "Merge Cells" to merge without changing the alignment.

Excel will merge your cells immediately. If you had data in cells other than the top-left one, that data is now gone. If you made a mistake, press Ctrl+Z right away to undo and get your data back.

Using the Format Cells dialog for more control

If the Merge & Center button is not visible or you want more options, you can merge through the Format Cells dialog. Select the cells you want to merge, then right-click and choose "Format Cells" from the menu. You can also press Ctrl+1 on your keyboard as a shortcut.

In the dialog that opens, click the "Alignment" tab. Look for the checkbox that says "Merge cells" and click it to turn it on. You will also see options to center your text horizontally and vertically if you want. Click OK when you are done, and your cells will merge.

This method gives you the same result as the Merge & Center button but lets you control alignment separately. You can merge cells without centering them, or center them in a specific way before merging.

Center Across Selection: an alternative that does not actually merge

If you want text to look centered across multiple cells but you do not want to actually merge them, use Center Across Selection instead. This keeps your cells separate, which means sorting and filtering will still work normally.

Select your cells the same way you would for merging. Open the Format Cells dialog (right-click and choose "Format Cells" or press Ctrl+1). Go to the Alignment tab and look for the "Horizontal" dropdown. Choose "Center Across Selection" from the list. Click OK.

Your text will now appear centered across the cells you selected, but the cells remain separate underneath. This is especially useful if you have a header row above data that you might need to sort later. The text looks merged, but you avoid the problems that actual merging can cause.

How to unmerge cells

To split a merged cell back into separate cells, click on the merged cell to select it. Go to the Home tab and click the arrow next to Merge & Center. Choose "Unmerge Cells" from the menu.

The merged cell will split back into its original separate cells. The text that was in the merged cell stays in the top-left cell of the range. The other cells will be empty. If you had data in those other cells before you merged, that data is still gone — unmerging does not bring it back.

Why merged cells cause problems with sorting and filtering

Merged cells can break sorting and filtering in your spreadsheet. When you try to sort data that includes merged cells, Excel may not sort correctly or may show an error message. Filtering can also behave unexpectedly with merged cells in the range.

For this reason, avoid merging cells in data tables. Use merging only for titles, headers, and labels that sit outside your actual data. If you have a spreadsheet where you need to sort or filter, keep your data cells separate and use merged cells only in the rows above your data.

If you have already merged cells in a data range and now need to sort, unmerge them first. Select the merged cells, unmerge them, and then your sort and filter functions will work normally.

Merging cells across rows versus across columns

You can merge cells horizontally (across columns in the same row) or vertically (down rows in the same column), or both at once. The process is the same regardless of direction — select the cells and use Merge & Center or the Format Cells dialog.

Merging across columns is most common for titles and headers that span the width of a table. Merging down rows is less common but useful if you have a label that applies to multiple rows of data. You can also merge a rectangular block of cells that spans both rows and columns, though this is rarely necessary.

Remember that no matter which direction you merge, Excel keeps only the content from the top-left cell and deletes the rest. Select carefully so you do not lose data you need.

Frequently Asked Questions

What happens to my data when I merge cells?

Excel keeps the content from the top-left cell and deletes everything in the other cells you are merging. If you have data in multiple cells, copy it somewhere else before you merge, or use Center Across Selection instead, which does not delete anything.

Can I merge cells that are not next to each other?

No, you can only merge cells that form a continuous rectangle. You cannot merge cells that are separated or scattered across the spreadsheet. If you need to format non-adjacent cells the same way, select them all and format them together without merging.

How do I center text across cells without merging them?

Select the cells, open Format Cells (Ctrl+1), go to the Alignment tab, and choose "Center Across Selection" from the Horizontal dropdown. The text will look centered across the cells, but they remain separate and will not interfere with sorting or filtering.

Can I undo a merge if I change my mind?

Yes. Click the merged cell and go to Home tab, then click the arrow next to Merge & Center and choose "Unmerge Cells." The cell will split back into separate cells. The text stays in the top-left cell, but any data that was in the other cells before merging is still gone.

Why does my sort function not work after I merged cells?

Merged cells interfere with sorting and filtering. Unmerge the cells in your data range first, then your sort will work normally. Keep merged cells only in header rows or titles above your actual data, not within the data itself.