Merging cells combines two or more cells into one larger cell
When you merge cells in Excel, you are combining multiple adjacent cells into a single cell. The merged cell spans across the rows or columns you selected. Excel keeps the content from the top-left cell and discards the rest, so you lose any data in the other cells you are merging.
Merging is useful when you want a title or label to stretch across several columns, or when you are formatting a spreadsheet to look more like a printed document. It is less useful when you are building a spreadsheet you plan to sort, filter, or analyze — merged cells can break those functions.
Key Takeaways
- Select the cells you want to merge, then use the Merge & Center button on the Home tab or go to Format > Merge Cells.
- Merging deletes all data except what was in the top-left cell, so copy any data you need before merging.
- Merged cells can interfere with sorting, filtering, and formulas, so avoid merging in data tables you plan to analyze.
- You can unmerge cells at any time by selecting the merged cell and choosing Unmerge Cells from the Format menu.
The steps to merge cells in Excel
Start by selecting the cells you want to merge. Click on the first cell, then hold Shift and click on the last cell in the range. If the cells are not in a straight line, you cannot merge them — Excel only merges rectangular blocks of cells.
Once you have selected your cells, go to the Home tab at the top of the screen. Look for the Merge & Center button in the Alignment group (it looks like a box with lines). Click the small arrow next to it to see your options: Merge & Center, Merge Across, or Merge Cells. Choose the one that fits what you need.
If you cannot find the button, use the menu instead: go to Format > Merge Cells and pick your option. The merged cell will appear in the top-left position of the cells you selected, and any content from the other cells will be deleted.
Why merged cells cause problems in data tables
If you plan to sort your spreadsheet by column, merged cells will break the sort. Excel cannot move a merged cell that spans multiple rows without disrupting the structure. The same problem happens with filtering — merged cells in the header row or data area can prevent filters from working correctly.
Formulas also behave unpredictably with merged cells. If you reference a merged cell in a formula, Excel treats it as the top-left cell only. If you try to reference the other cells that were merged, you will get an error. For this reason, avoid merging cells in any column or row you plan to use in a calculation.
If you have already merged cells and now need to sort or filter, unmerge them first. Select the merged cell, go to Format > Merge Cells > Unmerge Cells, and the original cells will separate again.
When merging cells makes sense
Merging works well for titles and section headers that sit above your data. If you want a title to span across columns 1 through 5, merge those cells in the row above your actual data. This creates a visual break without interfering with the data itself.
Merging also helps when you are formatting a spreadsheet to print. If you want your printed page to have a centered title across the top, merging cells in the header area gives you that layout. Just keep the actual data below in unmerged cells so it remains sortable and analyzable.
Use merging sparingly in working spreadsheets. The more you merge, the harder it becomes to edit, sort, or share the file with others. If you are building something you will use once and print, merging is fine. If you are building something you will update regularly or share with a team, keep merging to a minimum.
Alternatives to merging when you need a cleaner look
Instead of merging cells, you can center text across cells without actually combining them. Select the cells you want the text to span, then go to Format > Cells > Alignment and choose "Center Across Selection" from the Horizontal dropdown. The cells stay separate, so sorting and filtering still work.
You can also use borders and background colors to group related cells visually without merging them. This gives you the visual organization you want while keeping your data structure intact. For titles and labels, consider putting them in a separate row above your data table rather than merging cells within the table itself.
How to unmerge cells you no longer need
If you have merged cells and want to separate them again, select the merged cell. Go to Format > Merge Cells > Unmerge Cells. The cell will split back into its original separate cells. Any content that was in the merged cell will stay in the top-left cell of the group.
Unmerging does not restore data that was deleted during the original merge. If you merged cells that contained different data, that lost data is gone. This is why it is important to copy any data you need before merging cells together.
Frequently Asked Questions
Can I merge cells that are not next to each other?
No. Excel only merges rectangular blocks of adjacent cells. If you select cells that are separated or scattered across the spreadsheet, the merge button will not work. You must select a continuous range.
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 those cells contain data you need, copy it somewhere else first before you merge.
Can I sort a spreadsheet that has merged cells?
Merged cells interfere with sorting. If you try to sort a range that includes merged cells, Excel will either refuse to sort or produce unexpected results. Unmerge the cells first, then sort your data.
Is there a way to center text across cells without merging?
Yes. Select the cells, go to Format > Cells > Alignment, and choose "Center Across Selection" from the Horizontal dropdown. This centers your text visually across the cells without combining them, so your data stays sortable and filterable.
Can I merge cells in a table I plan to filter?
Avoid it. Merged cells in the header row or data area can break filtering. If you need a filtered table, keep all cells unmerged so the filter function works correctly.