Merging cells combines two or more cells into one larger cell

When you merge cells in Excel, you combine multiple adjacent cells into a single cell. The merged cell spans the width or height of all the cells you selected. Excel keeps the content from the top-left cell and discards the content from the other cells, so you should move or copy any data you want to keep before merging.

Merging is useful for creating titles that span multiple columns, labeling sections of a spreadsheet, or making headers more visually prominent. However, merged cells can cause problems with sorting, filtering, and formulas, so many spreadsheet users avoid them except for formatting headers and titles.

Key Takeaways

  • Select the cells you want to merge, then use the Merge & Center button in the Home tab or the Format Cells dialog to combine them.
  • Merging keeps only the content from the top-left cell and deletes content from all other selected cells.
  • Merged cells can interfere with sorting, filtering, and some formulas, so use them sparingly in data tables.
  • You can merge cells horizontally, vertically, or both at once, and you can unmerge them later without losing the remaining content.

How to merge cells using the Home tab

The quickest way to merge cells is through the ribbon. First, select the cells you want to merge by clicking the first cell and dragging to the last one, or by clicking the first cell, holding Shift, and clicking the last cell. Make sure the cells are adjacent — they must form a rectangle with no gaps.

Once selected, go to the Home tab. In the Alignment group, you will see a button labeled Merge & Center with a dropdown arrow next to it. Click the dropdown arrow to see your options: Merge & Center (centers the content), Merge Across (merges horizontally only), Merge Cells (merges without centering), or Unmerge Cells (splits a merged cell back apart).

If you just want to merge and center in one step, you can click the Merge & Center button directly without opening the dropdown. Excel will merge the selected cells and center the content both horizontally and vertically.

How to merge cells using Format Cells

For more control over how cells merge, use the Format Cells dialog. Select your cells, then right-click and choose Format Cells, or press Ctrl+1 on Windows or Command+1 on Mac. Go to the Alignment tab.

In the Alignment tab, you will see a checkbox labeled Merge Cells near the bottom. Check this box and click OK. This method merges without centering, giving you the option to set alignment separately using the horizontal and vertical alignment dropdowns in the same dialog.

What happens to your data when you merge

Excel keeps only the content from the top-left cell in the range you select. If you merge cells B2 through D2 and B2 contains "Sales" while C2 contains "Q1" and D2 contains "2024", only "Sales" will remain after the merge. The content from C2 and D2 is permanently deleted.

Before merging, copy or move any data you need from the other cells. You can paste it elsewhere in the spreadsheet or type it into the top-left cell before merging. Once you merge, you cannot undo the loss of that data — undo will only reverse the merge itself, not restore the deleted content.

Why merged cells can cause problems

Merged cells break some Excel features. If you try to sort a table that contains merged cells, Excel will either refuse to sort or produce unexpected results. Filtering also behaves unpredictably with merged cells. Many formulas that reference merged cells work fine, but some functions like VLOOKUP can become unreliable if the lookup range includes merged cells.

For these reasons, avoid merging cells within data tables. Use merging only for titles, headers, and labels outside your actual data. If you need a multi-line header, consider using text wrapping instead — select the cells, go to Home, click Wrap Text, and increase the row height. This keeps the cells separate and preserves sorting and filtering.

How to unmerge cells

To split a merged cell back into separate cells, select the merged cell, go to the Home tab, click the Merge & Center dropdown, and choose Unmerge Cells. The content stays in the top-left cell of the original range, and the other cells become empty again.

You can also unmerge through Format Cells: select the merged cell, press Ctrl+1, go to the Alignment tab, uncheck Merge Cells, and click OK. Both methods produce the same result.

Merging cells across rows versus columns

Merge Across combines cells horizontally only — useful for a title that spans multiple columns while staying in one row. Merge Cells combines cells in any direction, creating a larger rectangle that can span both rows and columns. For example, you could merge a 3-by-2 block of cells to create a large header area.

The Merge & Center button performs a full merge (both directions) and centers the content. If you need to merge only horizontally or want different alignment, use the dropdown menu or the Format Cells dialog instead.

Frequently Asked Questions

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

No. Excel only merges adjacent cells that form a continuous rectangle. If you select non-adjacent cells, the merge option will be grayed out. Select a continuous range instead.

Will merging cells affect my formulas?

Formulas that reference merged cells usually work, but some functions behave unpredictably. Avoid merging cells within ranges that formulas depend on. If a formula references a merged cell, it uses the top-left cell of the merged range.

Can I undo a merge and get my deleted data back?

Undo will reverse the merge itself, but it will not restore data that was deleted from the non-top-left cells. If you need that data, copy it to another location before merging, or use Undo immediately after the merge before doing anything else.

What is the difference between Merge & Center and Merge Cells?

Merge & Center combines the cells and centers the content horizontally and vertically. Merge Cells combines them without changing alignment, letting you set alignment separately. Both merge the cells the same way; the difference is only in formatting.

Should I use merged cells in a data table?

No. Merged cells in data tables interfere with sorting and filtering. Use them only for titles, labels, and headers outside your actual data. For multi-line headers within a table, use text wrapping instead.