Sub RowUnMerge_Cell()


Dim rTemp As Range, mTemp As Range
 
 
 On Error Resume Next
 Set rTemp = Application.Selection
 Set rTemp = Application.InputBox("병합을 해제할 셀의 범위를 지정해주세요", "병합해제범위", rTemp.Address, Type:=8)
 
 If rTemp Is Nothing Then
    MsgBox "범위 지정을 잘못되었습니다"
    Exit Sub
 End If

Application.ScreenUpdating = False
Application.DisplayAlerts = False


For Each mTemp In rTemp
    If mTemp.MergeCells Then
        With mTemp.MergeArea
          .UnMerge
          .Formula = mTemp.Formula
        End With
     End If
Next


rTemp.Select
With Selection.Borders
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
End With
    

Application.DisplayAlerts = True
Application.ScreenUpdating = True

End Sub