Macros

Unmerge Redundants

VBA: Unmerge Redundant Merges

Sub Unmerge_Redundants()
'This macro will unmerge all merged cells with no content; obtained from bgrconsulting.co.uk/macros where help and support can be found.
    For Each Sheet In ActiveWorkbook.Sheets
        On Error GoTo -1: On Error GoTo Next_Sh
        For Each Cell In Sheet.UsedRange.SpecialCells(xlCellTypeBlanks)
            If Cell.Address = Cell.MergeArea.Address Then GoTo Next_Cell
            Set MrgRng = Sheet.Range(Cell.MergeArea.Address)
            UnMrg = vbYes
                For Each cM In MrgRng
                    If cM.Value <> "" Then UnMrg = vbNo
                Next cM
            If UnMrg = vbYes Then Cell.UnMerge
Next_Cell:
        Next Cell
Next_Sh:
    Next Sheet
End Sub