'목록하단 광고 치환자(withSeok)
728x90
유튜브 채널

http://bit.ly/위드석 

 

 

 

질문 및 답글 링크
답변 조금 변형

 

Option Explicit
Sub Macro()
    Dim r As Range
    Dim rng As Range
    Dim c As Range

    Application.ScreenUpdating = 0
            'Range("$A$1").End(xlDown).Select
    Set r = Range("$A$1").End(xlDown)
    r.Activate
    Set c = r
    While Not IsEmpty(r)
        If r <> r.Offset(1) Then
            Application.DisplayAlerts = 0
            Range(c, r).Merge
            Application.DisplayAlerts = 1
            Set c = r.Offset(1)
        End If
        Set r = r.Offset(1)
    Wend
    Application.ScreenUpdating = 1
    r.Activate
    
End Sub

 

특정범위셀병합_VBA.xlsm
0.02MB

 

728x90

+ Recent posts