What merging and centering does
Merging combines two or more cells into a single larger cell. Centering positions text in the middle of that merged space. When you merge cells, Excel deletes the content of all but the top-left cell, so you lose any data in the cells being merged together. Centering is usually done at the same time, which is why Excel groups them as one command.
People typically merge cells to create a title that spans multiple columns, to make a header row look cleaner, or to organize a spreadsheet visually. It does not change how Excel calculates or stores data — it only changes how the cells appear on screen and when printed.
Key Takeaways
- Merging deletes the content of all cells except the top-left one, so copy any data you need before merging.
- Select the cells you want to merge, then use the Merge & Center button on the Home tab or the Format menu.
- Excel warns you when merging will delete data; you can choose to proceed or cancel.
- Merged cells can cause problems with sorting and filtering, so use them sparingly in data tables.
- To unmerge cells, select the merged cell and click Unmerge Cells in the same menu.
How to merge and center cells in three steps
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 or rectangle, hold Ctrl and click each cell individually. Excel will highlight all selected cells in blue.
Next, go to the Home tab at the top of the ribbon. Look for the Merge & Center button — it shows a small grid icon with an arrow pointing down. Click the arrow to see your options: Merge & Center, Merge Across, Merge Cells, or Unmerge Cells. Choose Merge & Center if you want the text centered, or Merge Cells if you want to keep the text left-aligned.
If any of the cells you selected contain data, Excel will show a warning that says "Some of the cells in your selection contain data. Merging will keep the data in the upper-left cell and discard the rest." Click OK to proceed, or Cancel to go back and copy the data first.
When to use merge and center, and when to avoid it
Merge and center works well for titles, headers, and labels that span the top of a spreadsheet. For example, if you have a report that covers columns A through D, you might merge cells A1 through D1 and center the title "Sales Report Q4" across all four columns. It makes the spreadsheet look organized and professional.
Avoid merging cells inside a data table — the rows and columns where you store actual numbers or information. Merged cells break sorting, filtering, and formulas. If you sort a table that contains merged cells, Excel may not sort correctly, and you could end up with misaligned data. If you need to filter by column, merged cells in that column will prevent the filter from working as expected.
A good rule: merge cells only above or below your data table, not within it. If you have already merged cells and now need to sort or filter, unmerge them first, do your sorting or filtering, then merge again afterward if you want.
Using the Format menu as an alternative
If the Merge & Center button is not visible on your ribbon, or if you prefer using menus, you can merge cells through the Format menu. Select your cells, then click Format at the top. Choose Cells, and a dialog box will open. Click the Alignment tab.
In the Alignment tab, look for a section labeled "Merge cells" with a checkbox. Check the box, then choose your alignment option from the dropdown below it — Center, Left, or Right. Click OK. This method gives you the same result as the Merge & Center button, but lets you choose the alignment separately if you want.
What happens to formulas and data when you merge
When you merge cells, Excel keeps only the content of the top-left cell and discards everything in the other cells. If the top-left cell is empty and the cells to its right contain data, that data disappears. This is why Excel warns you before merging — it is a destructive action.
If you have a formula in one of the cells being merged, the formula is lost unless it is in the top-left cell. If you have formulas elsewhere in your spreadsheet that reference the cells you are about to merge, those formulas will still work, but they will now reference the merged cell instead. The result usually stays the same, but it is worth checking your formulas after merging to be sure.
How to unmerge cells
To unmerge cells, click on the merged cell to select it. Go to the Home tab and click the Merge & Center button arrow. Choose Unmerge Cells. The merged cell will split back into its original separate cells. Any content that was in the merged cell stays in the top-left cell; the other cells become empty.
If you unmerge a cell and then want to undo that action, press Ctrl+Z immediately. Excel will redo the merge and restore the cell to its previous state. If you have made other changes since unmerging, undo may not work as expected, so it is safer to unmerge only when you are sure.
Frequently Asked Questions
What happens to my data when I merge cells?
Excel keeps the content of the top-left cell and deletes the content of all other cells in the range. If you have important data in any cell except the top-left one, copy it somewhere else before merging. Excel shows a warning before this happens, so you have a chance to cancel and save your data first.
Can I merge cells that are not next to each other?
No. You can only merge cells that form a continuous rectangle or row. If you select non-adjacent cells (cells with gaps between them), the Merge & Center button will be grayed out and you will not be able to use it. Select a continuous range instead.
Why does my sort or filter not work after I merged cells?
Merged cells interfere with sorting and filtering because Excel expects each column to have the same structure throughout. If you have merged cells in a data table, unmerge them before sorting or filtering. After you finish, you can merge them again if you want the visual effect.
Can I merge cells in a formula?
Yes, but it is not recommended. If you merge cells that contain a formula, the formula stays in the top-left cell and works normally. However, if other formulas reference the cells you are merging, the references change to point to the merged cell, which can cause confusion later. Keep formulas and merged cells separate when possible.
How do I center text without merging cells?
Select the cells you want to center, go to the Home tab, and click the Center alignment button (it looks like lines centered between two margins). This centers the text within each individual cell without merging them. This is safer for data tables because it does not break sorting or filtering.