How to unmerge all cells in excel
Tutor 5 (36 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
How do you unmerge all cells in Excel?
To unmerge all cells in Excel, select the entire worksheet by pressing Ctrl + A or clicking the triangle at the intersection of row and column headers, then click Merge & Center on the Home tab in the Alignment group. This action toggles off the merge for all selected merged cells across the sheet.
Unmerging all cells using the ribbon
To unmerge every merged cell across an entire Excel worksheet using the Ribbon:
Content from merged cells moves to the top-left cell of each original group, leaving all other cells blank. This method targets all merged cells efficiently without requiring the dropdown menu, distinguishing it from unmerging specific selections through Merge & Center dropdown > Unmerge Cells.
Unmerging all cells using the keyboard shortcut
To unmerge all cells using a keyboard shortcut, select the entire worksheet with Ctrl + A, then press Alt + H + M + C in sequence. This shortcut replicates clicking Home > Merge & Center and works on any selected range. The action instantly splits cells while moving content to the top-left position of each formerly merged area.
Unmerging all cells using VBA
To unmerge all cells using VBA:
Click the triangle in the upper-left corner of the worksheet, located above row 1 and left of column A, or press Ctrl + A to select the whole sheet.
Navigate to the Home tab and locate the Alignment group.
Click the Merge & Center button, which toggles to unmerge all selected merged cells.
- Press Alt + F11 to open the VBA editor.
- Insert a new module by clicking Insert > Module.
- Paste the following code:
ActiveSheet.Cells.UnMerge
End Sub
Sub UnMergeAllCells()
4. Press F5 to run the macro.
This macro unmerges every cell in the active sheet without requiring prior selection. VBA offers repeatability through button assignment and avoids manual repetition, making it ideal for frequent tasks.
What happens to data when unmerging cells?
Excel preserves data from merged cells during unmerging by retaining only the content in the upper-left cell of each group. All other newly separated cells become blank. Any unique data previously stored in non-upper-left cells gets permanently lost unless copied elsewhere beforehand.
Preserving data after unmerging
To preserve and duplicate data across unmerged cells:
- Copy values from cells that may lose data before unmerging.
- Unmerge via Home > Merge & Center dropdown > Unmerge Cells.
- Press Ctrl + G to open the Go To dialog.
- Click Special and select Blanks.
- Type "=" and press the arrow key corresponding to your merge direction (up or down).
- Press Ctrl + Enter to fill all blank cells with the upper-left value.
This method duplicates the preserved data across the entire range after unmerging.
Unmerging cells across different Excel versions
Windows
Select cells or the entire sheet using Ctrl + A, then navigate to Home > Merge & Center to toggle unmerge, or use the dropdown menu and select Unmerge Cells. The keyboard shortcut Alt + H + M + C applies after selection.
Mac
The Ribbon process on the Home tab functions identically to Windows. Selection uses Cmd + A instead of Ctrl + A. Unmerging occurs through the Merge & Center dropdown. VBA macros function the same way as on Windows.
Excel Online/Web
Unmerging works through Home > Merge icon dropdown > Unmerge Cells. The web version lacks full VBA support but offers Find & Select for blanks to fill data after unmerging. Data retention behavior remains identical to desktop versions.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Why are margins not working
Answers · 1
Why is page layout not working
Answers · 1
How to print repeated rows on top in excel
Answers · 1
How to print header on each page
Answers · 1