Merging cells combines two or more cells into one larger cell
When you merge cells in Excel, you're combining multiple adjacent cells into a single cell that spans across rows, columns, or both. The merged cell displays only the content from the top-left cell of the selection — any data in the other cells is hidden. This is useful for creating headers that stretch across several columns, or for making a spreadsheet easier to read visually.
The process itself takes seconds, but merging cells has real consequences for how your spreadsheet works. Merged cells can break sorting, filtering, and formulas. If you're building a spreadsheet that other people will use or that you'll need to reorganize later, you should understand those trade-offs before you merge.
Key Takeaways
- Select the cells you want to merge, then use the Merge & Center button in the Home tab (or Merge Cells if you don't want centering).
- Excel keeps only the content from the top-left cell when you merge; data in other cells is deleted unless you copy it first.
- Merged cells prevent sorting and filtering from working correctly on that column, which can cause problems later.
- For headers and labels, merging is straightforward; for data tables, consider using centered text across cells instead.
The step-by-step process for merging cells
Start by selecting the cells you want to merge. Click on the first cell, then drag to the last cell, or click the first cell and hold Shift while clicking the last cell. The cells must be adjacent — you cannot merge cells that are separated by other cells.
Once your cells are selected, go to the Home tab on the ribbon at the top. Look for the Merge & Center button in the Alignment group (it shows a small grid with an arrow). Click the dropdown arrow next to it to see your options: Merge & Center, Merge Across, Merge Cells, or Unmerge Cells. Choose the one that fits what you need. Merge & Center combines the cells and centers the text. Merge Across merges cells in a row only. Merge Cells combines them without centering. Click your choice, and the cells merge immediately.
If you change your mind, select the merged cell and click Merge & Center again, then choose Unmerge Cells.
What happens to your data when you merge
Excel keeps only the content from the top-left cell in the merged range. If you have text or numbers in the other cells, that data disappears. For example, if you merge cells A1 through D1, and A1 contains "Sales" while B1 contains "2024", the merged cell will show only "Sales" and "2024" is gone.
Before you merge, copy any data you want to keep from the other cells. Paste it somewhere else, or combine it into the top-left cell first. A common approach is to type all the text you want into the top-left cell before merging, so nothing is lost.
Why merged cells cause problems with sorting and filtering
If you merge cells in a data table, sorting and filtering stop working correctly. Excel's sort and filter features expect each column to have the same structure from top to bottom. A merged cell breaks that structure, so Excel either refuses to sort or sorts incorrectly.
This matters most if you're building a spreadsheet that you or someone else will need to reorganize. A header row that spans multiple columns is fine to merge — you're not sorting the header itself. But if you merge cells within your actual data, you've locked yourself out of using Excel's most useful features for that column.
Using centered text instead of merging for data tables
If you want text to look like it spans multiple columns but you need sorting and filtering to work, use centered text instead of merging. Select the cells you want the text to appear across, then go to Home and click the alignment button. Choose "Center Across Selection" from the dropdown. The text will look centered across the cells, but they remain separate, so sorting and filtering work normally.
This approach gives you the visual effect of merging without the technical problems. It's especially useful for headers in data tables or for labels in spreadsheets that you plan to reorganize.
When merging cells makes sense
Merging works well for headers that don't contain data you'll sort or filter. If you have a title row at the top of your spreadsheet, or a label that describes a section, merging is straightforward and causes no problems. You're not trying to sort the header row itself, so the limitations of merged cells don't apply.
Merging also works for creating visual separation in a spreadsheet — for example, a large merged cell that contains a section title or a note. As long as you're not merging cells that contain data you'll need to reorganize, you're safe.
Unmerging cells and fixing merged cell problems
To unmerge cells, select the merged cell and go to Home. Click the dropdown next to Merge & Center and choose Unmerge Cells. The merged cell splits back into separate cells, and the content stays in the top-left cell.
If you've already merged cells in a data table and now you need to sort or filter, unmerge first. Select the merged cells, unmerge them, then apply your sort or filter. If you want to keep the visual appearance of a merged header, use centered text across the cells instead, as described above.
Frequently Asked Questions
Can I merge cells that aren't next to each other?
No. Excel only merges adjacent cells — cells that touch each other in a rectangle. If you need to format non-adjacent cells the same way, select them all at once and apply formatting like color or font, but you cannot merge them.
What if I merge cells and then realize I need to sort that column?
Unmerge the cells first. Select the merged cell, go to Home, click the Merge & Center dropdown, and choose Unmerge Cells. Then you can sort normally. If you want the header to still look merged, use Center Across Selection instead.
Does merging cells affect formulas that reference them?
A formula that references a merged cell will use the value in the top-left cell of the merge. If you merge cells A1 and B1, a formula that says =A1 will still work, but =B1 will return an error because B1 no longer exists as a separate cell.
Can I merge cells in different rows and columns at the same time?
Yes. Select a rectangular range that includes multiple rows and columns, then merge. The merged cell will span the entire selection. For example, you can select A1 through D3 and merge all nine cells into one large cell.