It's best to avoid merged cells
Option Explicit
Public Sub SplitMerged()
Dim oWs As Excel.Worksheet
Dim rCL As Excel.Range
Dim uRng As Excel.Range
Dim MyAddr As String
Dim r As Long
Dim c As Long
Dim LastRow As Long
Dim LastColumn As Long
On Error Resume Next
Application.ScreenUpdating = False
Set oWs = ActiveSheet
Set uRng = oWs.UsedRange
LastRow = uRng.Rows(uRng.Rows.Count).Row
LastColumn = uRng.Columns(uRng.Columns.Count).Column
' Find the merged cells
For r = 1 To LastRow
For c = 1 To LastColumn
Cells(r, c).Select
MyAddr = Selection.Address
If Len(WorksheetFunction.Substitute(MyAddr, ":", "")) <> Len(MyAddr) Then
With Range(MyAddr)
Worksheets.Add after:=Worksheets(Worksheets.Count)
.Copy ActiveSheet.Cells(1, 1)
End With
End If
Next c
Next r
oWs.Select
Set uRng = Nothing
On Error GoTo 0
Application.ScreenUpdating = True
End Sub
Bookmarks