What merging cells does and when to use it
Merging cells combines two or more adjacent cells into a single larger cell. Excel joins the cells horizontally, vertically, or both, and the merged cell spans the space where the original cells were. This is useful for creating headers that stretch across multiple columns, labeling sections of a spreadsheet, or making a sheet easier to read visually.
The main trade-off is that merging deletes all but the top-left cell's content. If you merge three cells containing "Name", "Age", and "City", only "Name" survives — the other two values disappear. Excel warns you before this happens, but you need to know it's coming.
Most spreadsheets work better without merged cells because they break sorting, filtering, and formulas. If you're building a sheet you'll actually use for data entry or analysis, consider formatting instead of merging. If you're creating a title page or a printed report, merging is fine.
Key Takeaways
- Merging combines cells into one larger cell, but Excel keeps only the content from the top-left cell and discards the rest.
- Select the cells you want to merge, then use the Merge & Center button in the Home tab or the Format Cells dialog.
- Merged cells break sorting, filtering, and some formulas, so avoid them in data tables you plan to analyze.
- If you need a header to span columns without losing data, use Center Across Selection instead of merging.
How to merge cells step by step
Select the cells you want to merge by clicking the first cell and dragging to the last one. You can select cells in a row, a column, or a rectangular block. Once they're highlighted in blue, go to the Home tab at the top of the ribbon.
In the Home tab, look for the Merge & Center button in the Alignment group (usually near the middle-right of the ribbon). Click the small arrow next to it to see your options: Merge & Center, Merge Across, Merge Cells, or Unmerge Cells. Choose the one that fits what you're doing. Merge & Center combines the cells and centers the content. Merge Across merges cells in a row only. Merge Cells merges without centering.
Excel will warn you if any cells contain data that will be lost. Read the warning, click OK to proceed, and the cells merge. The content from the top-left cell stays; everything else is gone.
Using the Format Cells dialog instead
If the Merge & Center button isn't visible or you prefer a dialog box, you can merge through the Format Cells window. Select your cells, then right-click and choose Format Cells. The Format Cells dialog opens.
Click the Alignment tab. Near the bottom, you'll see a checkbox labeled Merge Cells. Check it and click OK. The cells merge. This method gives you the same result as the ribbon button but works the same way in older and newer versions of Excel.
Keeping your data when you need a spanning header
If you want a header to stretch across multiple columns but you don't want to lose the data in those columns, don't merge. Instead, use Center Across Selection. Select the cells (including the one with your header text), go to Home, click the Merge & Center arrow, and choose Merge & Center — but first, make sure only the leftmost cell has text in it.
A better approach: put your header in a single cell above the data, then select that header cell and the empty cells to its right. Go to Home, click the Merge & Center arrow, and select Merge & Center. The header text centers across the range without merging the cells below it, so your data stays intact and sorting still works.
If you've already merged cells and want to separate them again, select the merged cell, go to Home, click the Merge & Center arrow, and choose Unmerge Cells. The cell splits back into its original cells. Any content that was in the merged cell stays in the top-left cell.
Why merged cells cause problems in data tables
Merged cells break Excel's sorting and filtering features. If you try to sort a column that contains merged cells, Excel either refuses to sort or sorts incorrectly because it doesn't know which row each merged cell belongs to. Filtering has the same problem — merged cells confuse the filter dropdown.
Formulas also struggle with merged cells. If a formula refers to a merged cell, it uses only the top-left cell's address, which can cause confusion if you're working with a large sheet. Pivot tables and other advanced features often reject merged cells outright.
For these reasons, use merged cells only in areas of your sheet that aren't part of your data table — like a title section at the top, a summary area to the side, or a printed report layout. Keep your actual data in unmerged cells so Excel's tools work as intended.
Formatting alternatives to merging
If you want a polished look without the problems merging creates, use formatting instead. Select a cell and increase its font size, add a background color, or apply bold formatting. These changes make a cell stand out without breaking your data structure.
For headers that need to span visually, use Center Across Selection (as described above) or simply center text within a single cell and let it overflow into adjacent empty cells. The text appears to span, but the cells remain separate and your sheet stays functional.
You can also use borders and shading to group related columns visually without merging them. Select a range of cells, go to Home, click the border button, and choose a border style. This creates visual separation while keeping your data table intact.
Frequently Asked Questions
What happens to the data in cells I merge?
Excel keeps the content from the top-left cell and deletes everything in the other cells. Before you merge, Excel shows a warning telling you data will be lost. If you need to keep that data, copy it somewhere else first, or undo the merge immediately after.
Can I merge cells that aren't next to each other?
No. You can only merge cells that are adjacent — touching each other in a rectangle. If you select non-adjacent cells and try to merge, Excel won't let you. Select a continuous block of cells instead.
How do I unmerge cells?
Select the merged cell, go to the Home tab, click the Merge & Center arrow, and choose Unmerge Cells. The merged cell splits back into its original separate cells. Any text that was in the merged cell stays in the top-left cell.
Will merged cells work in Google Sheets?
Yes, Google Sheets supports merging. Select your cells, go to Format, click Merge Cells, and choose your merge type. The same data-loss warning applies — only the top-left cell's content survives. Google Sheets has the same limitations with sorting and filtering.
Can I merge cells in a formula?
You can reference a merged cell in a formula, but it's not recommended. The formula treats the merged cell as if it were only the top-left cell of the original range, which can cause confusion. Keep formulas and data in unmerged cells for clarity.