Merging and centering cells combines multiple cells into one and positions text in the middle
Merging cells in Excel combines two or more adjacent cells into a single larger cell. Centering positions your text in the middle of that merged space, both horizontally and vertically. This is useful when you want a title to span across several columns, or when you need a header that looks balanced above your data.
The process takes about 30 seconds once you know where the buttons are. Excel will warn you if merging will delete data, so you won't lose information by accident. The merged cell keeps the content from the top-left cell and discards the rest.
Key Takeaways
- Select the cells you want to merge by clicking and dragging across them, then use the Merge & Center button in the Home tab or the Format menu.
- Excel warns you before merging if you have data in cells other than the top-left one, giving you a chance to cancel.
- Merged cells can cause problems with sorting and filtering, so use them mainly for titles and headers rather than data rows.
- You can unmerge cells later by selecting the merged cell and clicking Unmerge Cells in the same menu.
How to merge and center in three steps
First, select the cells you want to combine. Click on the first cell, then hold your mouse button down and drag to the last cell you want to include. You can also click the first cell, hold Shift, and click the last cell. The selected cells will turn blue.
Second, go to the Home tab at the top of the ribbon. Look for a button that says "Merge & Center" — it usually shows a small grid with an arrow pointing down. Click it. If you see a dialog box asking whether you want to keep the content of the first cell, click OK.
Third, your cells are now merged and your text is centered. If you want to adjust the alignment after merging, you can use the alignment buttons in the Home tab to move the text left, right, or center it differently.
Using the Format menu instead of the ribbon
If you cannot find the Merge & Center button on your ribbon, or if you prefer using menus, you can merge cells through the Format menu. Select your cells first, then click Format at the top of the screen.
Choose "Merge Cells" from the dropdown. A submenu will appear with options: "Merge & Center", "Merge Across", "Merge Cells", and "Unmerge Cells". Click "Merge & Center" to combine and center in one step. The result is the same as using the ribbon button.
What happens to your data when you merge
When you merge cells, Excel keeps only the content from the top-left cell and removes everything from the other cells. If you have data in multiple cells before merging, Excel will show you a warning: "Some of the cells being merged contain data. Do you want to keep the data?" If you click OK, you lose the data in all cells except the top-left one.
To avoid losing information, copy any data from the other cells before you merge. Paste it somewhere else in your spreadsheet, or write it down. Then merge safely knowing nothing is lost.
Why merged cells can cause problems with sorting and filtering
Merged cells do not work well with Excel's sort and filter features. If you try to sort a column that contains merged cells, Excel may refuse to sort, or it may sort incorrectly. Filtering can also behave unexpectedly around merged cells.
For this reason, use merged cells only for titles, headers, and labels — not for rows of actual data. If you have a spreadsheet where each row represents a person or transaction, do not merge cells within those rows. Keep your data rows unmerged so sorting and filtering work correctly.
How to unmerge cells and separate them again
If you change your mind about a merged cell, you can separate it back into individual cells. Click on the merged cell to select it. Then go to the Home tab and click the Merge & Center button again — it will now show "Unmerge Cells" in the dropdown menu. Click that option.
The merged cell splits back into the original number of cells. The text stays in the top-left cell, and the other cells become empty. Your formatting (bold, color, font size) stays with the text, but the centering across the merged space is gone.
Centering text without merging cells
If you want text centered but do not want to merge cells, you have another option. Select the cells where you want the text to appear centered. In the Home tab, click the center alignment button (it shows lines centered between two margins). The text will center within its own cell without combining cells.
This approach is safer for data because it does not interfere with sorting or filtering. Use this method when you want a clean look but need to keep your cells separate for calculations or data management.
Frequently Asked Questions
Can I merge cells that are not next to each other?
No. Excel only merges adjacent cells — cells that touch each other horizontally or vertically. If you select cells that are separated by other cells, the merge button will not work. You must select a continuous block of cells.
What if I merged cells by accident and lost data?
Press Ctrl+Z (or Cmd+Z on Mac) when ready to undo the merge. This restores the separate cells and brings back any data that was in the non-top-left cells. If you have already done other work since the merge, undo may go back further than you want, so use it carefully.
Can I merge cells vertically and horizontally at the same time?
Yes. Select a block of cells that spans multiple rows and multiple columns, then click Merge & Center. The cells combine into one large cell, and the text centers both left-to-right and top-to-bottom within that space.
Does merging cells change the row height or column width?
Merging does not automatically resize rows or columns. The merged cell uses the height of the first row and the width of the first column in your selection. If you want the merged cell larger, you can manually drag the row border down or the column border right to make more space.
Will merged cells cause problems if I share my spreadsheet with someone else?
Merged cells usually transfer fine when you share a file, but some people may have trouble editing around them. If the other person tries to insert a row or column through a merged cell, they may get an error. Keep merged cells in header areas where insertion is unlikely.