ⓒ 2025 AI교육연구회 withseok. All rights reserved. (위드석)
[블로그 글 내용 상업적 이용금지] 위드석홈 | 위드석개발 | AI교육연구회

유튜브 채널

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

 

320x100

+ Recent posts