[VBA] 현재 칸과 바로 아래칸의 병합

[VBA] 현재 칸과 바로 아래칸의 병합

    ‘현재 칸과 바로 아래 칸을 선택
    ‘Range(“A1:A2”).Select
    Range(ActiveCell.Offset(0, 0).Cells, ActiveCell.Offset(1, 0).Cells).Select
   
    ‘셀 병합
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge
   
    ‘오른쪽으로 한 칸 이동
    ActiveCell.Offset(0, 1).Select